瀏覽代碼

fix: slash command clash for the demo graph

charlie 1 年之前
父節點
當前提交
b1fa7ee8ad
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/main/frontend/components/editor.cljs

+ 2 - 1
src/main/frontend/components/editor.cljs

@@ -54,7 +54,8 @@
                command-doc (get item 2)
                plugin-id (get-in item [1 1 1 :pid])
                doc (when (state/show-command-doc?) command-doc)
-               icon-name (some-> item (get 3) (name))
+               options (some-> item (get 3))
+               icon-name (some-> (if (map? options) :icon options) (name))
                command-name (if icon-name
                               [:span.flex.items-center.gap-1
                                (shui/tabler-icon icon-name)