Skip to content

Commit b5b659a

Browse files
committed
🐛 Fix abe33#93 Issue
Reference source abe33#93 (comment)
1 parent fc5f07c commit b5b659a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lib/table-element.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,8 +1306,10 @@ class TableElement extends HTMLElement {
13061306
const cursorValue = cursor.getValue()
13071307
this.editor.setText(String(cursorValue || this.getUndefinedDisplay()))
13081308

1309-
this.editor.getBuffer().history.clearUndoStack()
1310-
this.editor.getBuffer().history.clearRedoStack()
1309+
if (this.editor.getBuffer().history != undefined) {
1310+
this.editor.getBuffer().history.clearUndoStack()
1311+
this.editor.getBuffer().history.clearRedoStack()
1312+
}
13111313

13121314
if (initialData) { this.editor.setText(initialData) }
13131315
}
@@ -1353,8 +1355,10 @@ class TableElement extends HTMLElement {
13531355
this.editorElement.focus()
13541356
this.editor.setText(this.columnUnderEdit.name != null ? this.columnUnderEdit.name : columnName(columnIndex))
13551357

1356-
this.editor.getBuffer().history.clearUndoStack()
1357-
this.editor.getBuffer().history.clearRedoStack()
1358+
if (this.editor.getBuffer().history != undefined) {
1359+
this.editor.getBuffer().history.clearUndoStack()
1360+
this.editor.getBuffer().history.clearRedoStack()
1361+
}
13581362
}
13591363
}
13601364

0 commit comments

Comments
 (0)