mirror of
https://github.com/penpot/penpot.git
synced 2026-03-14 22:46:00 +00:00
Fixes a crash where plugins sending messages via 'penpot.ui.sendMessage()' could fail if their message payload contained non-serializable values like functions or closures. The fix adds validation using 'structuredClone()' to catch these messages early with a helpful error message, and adds a defensive try/catch in the modal's message handler as a safety net. Fixes the error: 'Failed to execute postMessage on Window: ... could not be cloned.' Signed-off-by: Andrey Antukh <niwi@niwi.nz>