Skip to content

Commit 0b7de96

Browse files
committed
(fix) input events array elements
1 parent 771c9cf commit 0b7de96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/Room/Room.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ export default {
10881088
const items = pasteEvent.clipboardData?.items
10891089
10901090
if (items) {
1091-
items.forEach(item => {
1091+
Array.from(items).forEach(item => {
10921092
if (item.type.includes('image')) {
10931093
const blob = item.getAsFile()
10941094
this.onFileChange([blob])
@@ -1100,7 +1100,7 @@ export default {
11001100
this.fileDialog = true
11011101
this.focusTextarea()
11021102
1103-
files.forEach(async file => {
1103+
Array.from(files).forEach(async file => {
11041104
const fileURL = URL.createObjectURL(file)
11051105
const blobFile = await fetch(fileURL).then(res => res.blob())
11061106
const typeIndex = file.name.lastIndexOf('.')

0 commit comments

Comments
 (0)