diff --git a/CHANGES.md b/CHANGES.md index 79827009da..8a0e021d06 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -58,6 +58,7 @@ on-premises instances** that want to keep up to date. - Fix mixed letter spacing and line height [Taiga #11178](https://tree.taiga.io/project/penpot/issue/11178) - Fix snap nodes shortcut [Taiga #11054](https://tree.taiga.io/project/penpot/issue/11054) - Fix changing a text property in a text layer does not unapply the previously applied token in the same property [Taiga #11337}(https://tree.taiga.io/project/penpot/issue/11337) +- Fix shortcut error pressing G+W from the View Mode [Taiga #11061](https://tree.taiga.io/project/penpot/issue/11061) ## 2.7.2 diff --git a/frontend/src/app/main/data/workspace/layout.cljs b/frontend/src/app/main/data/workspace/layout.cljs index 2539103d15..44cd36e5ce 100644 --- a/frontend/src/app/main/data/workspace/layout.cljs +++ b/frontend/src/app/main/data/workspace/layout.cljs @@ -148,13 +148,14 @@ "Given the current layout flags, and updates them with the data stored in Storage." [layout] - (reduce (fn [layout [flag key]] - (condp = (get storage/user key ::none) - ::none layout - false (disj layout flag) - true (conj layout flag))) - layout - layout-flags-persistence-mapping)) + (let [layout (set (or layout #{}))] + (reduce-kv (fn [layout flag key] + (condp = (get storage/user key ::none) + ::none layout + false (disj layout flag) + true (conj layout flag))) + layout + layout-flags-persistence-mapping))) (defn persist-layout-flags! "Given a set of layout flags, and persist a subset of them to the Storage."