🐛 Coerce finalize? in WASM text updates for valid undo flags

This commit is contained in:
Alejandro Alonso
2026-03-20 09:43:00 +01:00
parent 0df6b30f79
commit 1126ed37f1

View File

@@ -966,7 +966,11 @@
ptk/WatchEvent
(watch [it state _]
(if (features/active-feature? state "render-wasm/v1")
(let [objects (dsh/lookup-page-objects state)
(let [;; v3 editor always passes :finalize? from keyword opts; when absent
;; that binds nil and :or defaults do not apply — coerce so undo flags
;; stay strict booleans for changes-builder schema validation.
finalize? (boolean finalize?)
objects (dsh/lookup-page-objects state)
shape (get objects id)
new-shape? (contains? (:workspace-new-text-shapes state) id)
prev-content (:content shape)