mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
🐛 Avoid crash on empty string in interaction prototype (#6687)
Fixes #6469 Using `uuid/parse` caused a crash when "Relative to" field was set to "auto", producing an empty string. This change uses `uuid/parse*` instead, which safely returns nil for invalid or empty inputs, preventing the crash. Signed-off-by: Dmitriy Mikheev <mirakernel.disroot.org> Co-authored-by: kira <kira@kira.kira>
This commit is contained in:
parent
2af1feafb6
commit
409ff31c30
1 changed files with 1 additions and 1 deletions
|
@ -258,7 +258,7 @@
|
|||
(mf/use-fn
|
||||
(mf/deps index update-interaction)
|
||||
(fn [event]
|
||||
(let [value (uuid/parse event)]
|
||||
(let [value (uuid/parse* event)]
|
||||
(update-interaction index #(ctsi/set-position-relative-to % value)))))
|
||||
|
||||
change-preserve-scroll
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue