mirror of
https://github.com/penpot/penpot.git
synced 2025-07-19 04:57:13 +02:00
🐛 Prevent NPE on get-points
This commit is contained in:
parent
122e5a4b57
commit
4e3abcbd45
2 changed files with 10 additions and 3 deletions
|
@ -272,7 +272,8 @@
|
|||
hover-handlers
|
||||
hover-points
|
||||
snap-toggled]
|
||||
:as edit-path} (mf/deref edit-path-ref)
|
||||
:as edit-path}
|
||||
(mf/deref edit-path-ref)
|
||||
|
||||
selected-points (or selected-points #{})
|
||||
shape (hooks/use-equal-memo shape)
|
||||
|
@ -282,7 +283,7 @@
|
|||
|
||||
base-points
|
||||
(mf/with-memo [base-content]
|
||||
(path.segment/get-points base-content))
|
||||
(path/get-points base-content))
|
||||
|
||||
content
|
||||
(mf/with-memo [base-content content-modifiers]
|
||||
|
@ -290,7 +291,7 @@
|
|||
|
||||
content-points
|
||||
(mf/with-memo [content]
|
||||
(path.segment/get-points content))
|
||||
(path/get-points content))
|
||||
|
||||
point->base (->> (map hash-map content-points base-points) (reduce merge))
|
||||
base->point (map-invert point->base)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue