Przeglądaj źródła

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

Andelf 3 lat temu
rodzic
commit
33907e4738
1 zmienionych plików z 10 dodań i 4 usunięć
  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
   [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
   [local-graph-uuid]