Merge pull request #3599 from penpot/niwinz-develop-experiments-3

🐛 Replace `:use-for-thumbnail?` with `:use-for-thumbnail`
This commit is contained in:
Alejandro 2023-09-14 06:39:06 +02:00 committed by GitHub
commit a4754a2106
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 29 additions and 14 deletions

View file

@ -6,4 +6,4 @@
(ns app.common.files.defaults)
(def version 30)
(def version 31)

View file

@ -576,3 +576,18 @@
(-> data
(update :pages-index update-vals update-container)
(update :components update-vals update-container))))
(defmethod migrate 31
[data]
(letfn [(update-object [object]
(cond-> object
(contains? object :use-for-thumbnail?)
(-> (assoc :use-for-thumbnail (:use-for-thumbnail? object))
(dissoc :use-for-thumbnail?))))
(update-container [container]
(d/update-when container :objects update-vals update-object))]
(-> data
(update :pages-index update-vals update-container)
(update :components update-vals update-container))))