mirror of
https://github.com/penpot/penpot.git
synced 2026-08-01 10:56:20 +00:00
Merge pull request #6411 from penpot/alotor-perf-fix-text-editor-v2-error
🐛 Fix problem with editor v2
This commit is contained in:
commit
eeea5f2cc8
@ -104,7 +104,6 @@
|
|||||||
focus (mf/deref refs/workspace-focus-selected)
|
focus (mf/deref refs/workspace-focus-selected)
|
||||||
|
|
||||||
workspace-editor-state (mf/deref refs/workspace-editor-state)
|
workspace-editor-state (mf/deref refs/workspace-editor-state)
|
||||||
workspace-v2-editor-state (mf/deref refs/workspace-v2-editor-state)
|
|
||||||
|
|
||||||
file-id (get file :id)
|
file-id (get file :id)
|
||||||
objects (get page :objects)
|
objects (get page :objects)
|
||||||
@ -300,10 +299,8 @@
|
|||||||
(fn []
|
(fn []
|
||||||
(wasm.api/clear-canvas))))
|
(wasm.api/clear-canvas))))
|
||||||
|
|
||||||
(mf/with-effect [show-text-editor? workspace-editor-state workspace-v2-editor-state edition]
|
(mf/with-effect [show-text-editor? workspace-editor-state edition]
|
||||||
(let [editor-state (get workspace-editor-state edition)
|
(let [active-editor-state (get workspace-editor-state edition)]
|
||||||
v2-editor-state (get workspace-v2-editor-state edition)
|
|
||||||
active-editor-state (or v2-editor-state editor-state)]
|
|
||||||
(when (and show-text-editor? active-editor-state)
|
(when (and show-text-editor? active-editor-state)
|
||||||
(let [content (-> active-editor-state
|
(let [content (-> active-editor-state
|
||||||
(ted/get-editor-current-content)
|
(ted/get-editor-current-content)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user