mirror of
https://github.com/penpot/penpot.git
synced 2026-03-25 12:50:35 +01:00
🐛 Fix objects-map and pointer-map issues on file crud
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
(ns app.common.data
|
||||
"A collection if helpers for working with data structures and other
|
||||
data resources."
|
||||
(:refer-clojure :exclude [read-string hash-map merge name update-vals
|
||||
(:refer-clojure :exclude [read-string hash-map merge name
|
||||
parse-double group-by iteration concat mapcat
|
||||
parse-uuid max min])
|
||||
#?(:cljs
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
|
||||
(defmulti migrate :version)
|
||||
|
||||
(defn need-migration?
|
||||
[{:keys [data]}]
|
||||
(> cfd/version (:version data 0)))
|
||||
|
||||
(defn migrate-data
|
||||
([data] (migrate-data data version))
|
||||
([data to-version]
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
(ns app.common.types.page
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.features :as cfeat]
|
||||
[app.common.schema :as sm]
|
||||
[app.common.types.color :as-alias ctc]
|
||||
[app.common.types.grid :as ctg]
|
||||
@@ -71,13 +70,9 @@
|
||||
|
||||
(defn make-empty-page
|
||||
[id name]
|
||||
(let [wrap-objects-fn cfeat/*wrap-with-objects-map-fn*
|
||||
wrap-pointer-fn cfeat/*wrap-with-pointer-map-fn*]
|
||||
(-> empty-page-data
|
||||
(assoc :id id)
|
||||
(assoc :name name)
|
||||
(update :objects wrap-objects-fn)
|
||||
(wrap-pointer-fn))))
|
||||
(-> empty-page-data
|
||||
(assoc :id id)
|
||||
(assoc :name name)))
|
||||
|
||||
;; --- Helpers for flow
|
||||
|
||||
|
||||
Reference in New Issue
Block a user