瀏覽代碼

Fix #1738: Bug: DrawioModal is not opened when editing blank page

Koki Oyatsu 6 年之前
父節點
當前提交
fcf9967033
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/client/js/components/PageEditor/MarkdownDrawioUtil.js

+ 4 - 1
src/client/js/components/PageEditor/MarkdownDrawioUtil.js

@@ -83,7 +83,10 @@ class MarkdownDrawioUtil {
    * return boolean value whether the cursor position is in a drawio
    */
   isInDrawioBlock(editor) {
-    return (this.getBod(editor) !== this.getEod(editor));
+    const bod = this.getBod(editor);
+    const eod = this.getEod(editor);
+
+    return (JSON.stringify(bod) !== JSON.stringify(eod));
   }
 
   /**