fix(ui): null while query .editor-wrapper

pull/8386/head
Andelf 2023-01-18 15:21:57 +08:00
parent cfe28ca88a
commit 5dcbe6cdf5
1 changed files with 2 additions and 2 deletions

View File

@ -381,8 +381,8 @@
:z-index 11}
(when set-default-width?
{:width max-width})
(let [^js/HTMLElement editor
(js/document.querySelector ".editor-wrapper")]
(when-let [^js/HTMLElement editor
(js/document.querySelector ".editor-wrapper")]
(if (<= (.-clientWidth editor) (+ left (if set-default-width? max-width 500)))
{:right 0}
{:left (if (or (nil? y-diff) (and y-diff (= y-diff 0))) left 0)})))]