Browse Source

fix: clicking on icon in publishing doesn't crash app

publishing doesn't have js/tablerIcons which causes the crash.
publishing shouldn't be showing editing to begin with
Gabriel Horner 1 year ago
parent
commit
e60c40b699
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/main/frontend/components/property.cljs

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

@@ -588,7 +588,8 @@
                                                                                  {:properties {icon-property-id icon}})]
                                   (shui/popup-hide! id)))))}))]
        [:button.flex
-        {:on-click #(shui/popup-show! (.-target %) content-fn {:as-menu? true})}
+        (when-not config/publishing?
+          {:on-click #(shui/popup-show! (.-target %) content-fn {:as-menu? true})})
         (if icon
           (icon-component/icon icon)
           [:span.bullet-container.cursor (when collapsed? {:class "bullet-closed"})