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

fix: Stat.isFile is not available

Yukun Guo 5 лет назад
Родитель
Сommit
f6d2d65328
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/main/frontend/fs.cljs

+ 1 - 1
src/main/frontend/fs.cljs

@@ -109,7 +109,7 @@
 
     :else
     (p/let [stat (js/window.pfs.stat path)]
-      (if (.-isFile stat)
+      (if (= (.-type stat) "file")
         (js/window.pfs.unlink path opts)
         (p/rejected "Unlinking a directory is not allowed")))))