ソースを参照

fix(sync): check current-user-uuid against nil

Andelf 3 年 前
コミット
33907e4738
1 ファイル変更10 行追加4 行削除
  1. 10 4
      src/main/frontend/fs/sync.cljs

+ 10 - 4
src/main/frontend/fs/sync.cljs

@@ -1439,10 +1439,16 @@
 
 
 (defn- check-graph-belong-to-current-user
 (defn- check-graph-belong-to-current-user
   [current-user-uuid graph-user-uuid]
   [current-user-uuid graph-user-uuid]
-  (let [result (= current-user-uuid graph-user-uuid)]
-    (when-not result
-      (notification/show! (t :file-sync/other-user-graph) :warning false))
-    result))
+  (cond
+    (nil? current-user-uuid)
+    false
+
+    (= current-user-uuid graph-user-uuid)
+    true
+
+    :else
+    (do (notification/show! (t :file-sync/other-user-graph) :warning false)
+        false)))
 
 
 (defn check-remote-graph-exists
 (defn check-remote-graph-exists
   [local-graph-uuid]
   [local-graph-uuid]