diff --git a/common/src/app/common/files/changes_builder.cljc b/common/src/app/common/files/changes_builder.cljc index 69ef62b13e..733482c368 100644 --- a/common/src/app/common/files/changes_builder.cljc +++ b/common/src/app/common/files/changes_builder.cljc @@ -84,8 +84,7 @@ (defn with-objects [changes objects] - (let [fdata (binding [cfeat/*current* #{"components/v2"}] - (ctf/make-file-data (uuid/next) uuid/zero)) + (let [fdata (ctf/make-file-data (uuid/next) uuid/zero) fdata (assoc-in fdata [:pages-index uuid/zero :objects] objects)] (vary-meta changes assoc ::file-data fdata diff --git a/common/src/app/common/types/file.cljc b/common/src/app/common/types/file.cljc index dbe637f457..55725bb69f 100644 --- a/common/src/app/common/types/file.cljc +++ b/common/src/app/common/types/file.cljc @@ -127,11 +127,11 @@ (ctp/make-empty-page {:id page-id :name "Page 1"}))] (cond-> (assoc empty-file-data :id file-id) - (some? page-id) + (some? page) (ctpl/add-page page) :always - (assoc-in [:options :components-v2] true))))) + (update :options assoc :components-v2 true))))) (defn make-file [{:keys [id project-id name revn is-shared features