mirror of
https://github.com/penpot/penpot.git
synced 2025-03-12 15:51:37 -05:00
🐛 Fix unexpected exception on workspace first initialization.
This commit is contained in:
parent
8d03ff40ab
commit
5d5a7a21d2
1 changed files with 2 additions and 3 deletions
|
@ -76,8 +76,8 @@
|
||||||
(rx/cancel! shortcuts-subscription))
|
(rx/cancel! shortcuts-subscription))
|
||||||
|
|
||||||
(mf/defc workspace
|
(mf/defc workspace
|
||||||
[{:keys [page wst] :as props}]
|
[{:keys [page] :as props}]
|
||||||
(let [flags (mf/deref refs/flags)
|
(let [flags (or (mf/deref refs/flags) #{})
|
||||||
canvas (mf/use-ref* nil)
|
canvas (mf/use-ref* nil)
|
||||||
|
|
||||||
left-sidebar? (not (empty? (keep flags [:layers :sitemap
|
left-sidebar? (not (empty? (keep flags [:layers :sitemap
|
||||||
|
@ -88,7 +88,6 @@
|
||||||
:no-tool-bar-right (not right-sidebar?)
|
:no-tool-bar-right (not right-sidebar?)
|
||||||
:no-tool-bar-left (not left-sidebar?)
|
:no-tool-bar-left (not left-sidebar?)
|
||||||
:scrolling (:viewport-positionig workspace))]
|
:scrolling (:viewport-positionig workspace))]
|
||||||
;; (prn "workspace.render")
|
|
||||||
|
|
||||||
(mf/use-effect {:deps (:id page)
|
(mf/use-effect {:deps (:id page)
|
||||||
:init #(subscibe canvas page)
|
:init #(subscibe canvas page)
|
||||||
|
|
Loading…
Add table
Reference in a new issue