🐛 Fix crash when pressing Shift 1 in an empty file

This commit is contained in:
eva 2022-01-04 11:57:49 +01:00 committed by Alonso Torres
parent 1321bdeac5
commit c4fb826d89
2 changed files with 2 additions and 3 deletions

View file

@ -635,9 +635,7 @@
objects (wsh/lookup-page-objects state page-id)
shapes (cp/select-toplevel-shapes objects {:include-frames? true})
srect (gsh/selection-rect shapes)]
(if (or (mth/nan? (:width srect))
(mth/nan? (:height srect)))
(if (= 0 (count shapes))
state
(update state :workspace-local
(fn [{:keys [vport] :as local}]