fix: 'Click to edit' console errors

When clicking to create a page's first block, value can be nil in buggy
fn. Related to LOG-3166
experiment/tanstack-table
Gabriel Horner 2024-06-24 10:28:10 -04:00
parent 305b7ff570
commit 159f7eadc4
1 changed files with 3 additions and 2 deletions

View File

@ -814,11 +814,12 @@
nil)]))
(defn- editor-on-hide
[state value type e]
[state value* type e]
(let [repo (state/get-current-repo)
action (state/get-editor-action)
[opts _id config] (:rum/args state)
block (:block opts)]
block (:block opts)
value (or value* "")]
(cond
(and (= type :esc) (exist-editor-commands-popup?))
nil