浏览代码

fix: while condition

charlie 1 年之前
父节点
当前提交
d2f1fd52f4
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/main/frontend/ui.cljs

+ 3 - 3
src/main/frontend/ui.cljs

@@ -62,9 +62,9 @@
     (some-> (shui-popups/get-last-popup) :content-props :class)))
 (defn hide-popups-until-preview-popup!
   []
-  (when shui-popups?
-    (while (not (last-shui-preview-popup?))
-      (shui/popup-hide!))))
+  (while (and (shui-popups?)
+           (not (last-shui-preview-popup?)))
+    (shui/popup-hide!)))
 
 (def built-in-colors
   ["yellow"