Explorar o código

Update textWysiwyg.tsx

zsviczian %!s(int64=3) %!d(string=hai) anos
pai
achega
326da61573
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      src/element/textWysiwyg.tsx

+ 4 - 1
src/element/textWysiwyg.tsx

@@ -551,7 +551,10 @@ export const textWysiwyg = ({
     setTimeout(() => {
       editable.onblur = () => {
         app.setState({
-          toastMessage: "debug: " + target?.tagName ?? "no tagName",
+          toastMessage: "debug: " +
+          target instanceof HTMLElement
+            ? target.tagName ?? "no tagName"
+            : "not an HTMLElement",
         });
         if (isShapeActionsPanel) {
           return;