Browse Source

fix(plugin): editor hook payload

charlie 4 years ago
parent
commit
29d680f5a8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/main/frontend/commands.cljs

+ 2 - 2
src/main/frontend/commands.cljs

@@ -424,8 +424,8 @@
 
 (defmulti handle-step first)
 
-(defmethod handle-step :editor/hook [[_ event {:keys [pid] :as payload}] format]
-  (plugin-handler/hook-plugin-editor event (merge payload {:format format :uuid (:block/uuid (state/get-edit-block))}) pid))
+(defmethod handle-step :editor/hook [[_ event {:keys [pid uuid] :as payload}] format]
+  (plugin-handler/hook-plugin-editor event (merge payload {:format format :uuid (or uuid (:block/uuid (state/get-edit-block)))}) pid))
 
 (defmethod handle-step :editor/input [[_ value option]]
   (when-let [input-id (state/get-edit-input-id)]