Просмотр исходного кода

Merge pull request #1739 from kaishuu0123/fix/drawiomodal-is-not-opened-when-editing-blank-page

Fix #1738: Bug: DrawioModal is not opened when editing blank page
Yuki Takei 6 лет назад
Родитель
Сommit
25e7bc41c5
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));
   }
 
   /**