mirror of
https://github.com/penpot/penpot.git
synced 2025-08-06 10:38:21 +02:00
✨ Prevent adding object map to not loaded pointer-map containers
This commit is contained in:
parent
3212ed9bd1
commit
ba55d657a4
3 changed files with 24 additions and 8 deletions
|
@ -68,6 +68,7 @@
|
|||
(get-id [_])
|
||||
(load! [_])
|
||||
(modified? [_])
|
||||
(loaded? [_])
|
||||
(clone [_]))
|
||||
|
||||
(deftype PointerMap [id mdata
|
||||
|
@ -90,6 +91,7 @@
|
|||
(or odata {}))
|
||||
|
||||
(modified? [_] modified?)
|
||||
(loaded? [_] loaded?)
|
||||
(get-id [_] id)
|
||||
|
||||
(clone [this]
|
||||
|
@ -210,8 +212,6 @@
|
|||
(defn create
|
||||
([]
|
||||
(let [id (uuid/next)
|
||||
|
||||
|
||||
mdata (assoc *metadata* :created-at (dt/now))
|
||||
pmap (PointerMap. id mdata {} true true)]
|
||||
(some-> *tracked* (swap! assoc id pmap))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue