Просмотр исходного кода

fix: pasting logseq shape issue

Peng Xiao 3 лет назад
Родитель
Сommit
f42b3c20f0
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      tldraw/apps/tldraw-logseq/src/hooks/usePaste.ts

+ 1 - 1
tldraw/apps/tldraw-logseq/src/hooks/usePaste.ts

@@ -241,7 +241,7 @@ export function usePaste(context: LogseqContextValue) {
         return false
         return false
       }
       }
 
 
-      if (files) {
+      if (files && files.length > 0) {
         await handleFiles(files)
         await handleFiles(files)
       } else {
       } else {
         for (const item of await navigator.clipboard.read()) {
         for (const item of await navigator.clipboard.read()) {