浏览代码

fix(plugin): editor hook payload

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

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

@@ -424,8 +424,8 @@
 
 
 (defmulti handle-step first)
 (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]]
 (defmethod handle-step :editor/input [[_ value option]]
   (when-let [input-id (state/get-edit-input-id)]
   (when-let [input-id (state/get-edit-input-id)]