Преглед изворни кода

135395 get lastLine number directly

soumaeda пре 2 година
родитељ
комит
def8d9f67d
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      apps/app/src/components/PageEditor/MarkdownTableUtil.js

+ 1 - 1
apps/app/src/components/PageEditor/MarkdownTableUtil.js

@@ -60,7 +60,7 @@ class MarkdownTableUtil {
     }
 
     const doc = editor.state.doc;
-    const lastLineNum = doc.line(doc.lines).number;
+    const lastLineNum = doc.lines;
     let line = doc.lineAt(this.curPos(editor)).number + 1;
     for (; line <= lastLineNum; line++) {
       const strLine = doc.line(line).text;