Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/csv-editor-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,12 @@ class CSVEditorElement extends HTMLElement {

requestAnimationFrame(() => {
this.updatePreview(this.collectOptions())
this.model.applyChoice()
// Fix Issue #89 Uncaught TypeError: Cannot read property 'applyChoice' of undefined
try {
this.model.applyChoice()
} catch (e) {
this.destroy()
}
})
}

Expand Down
5 changes: 3 additions & 2 deletions lib/table-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -1306,8 +1306,9 @@ class TableElement extends HTMLElement {
const cursorValue = cursor.getValue()
this.editor.setText(String(cursorValue || this.getUndefinedDisplay()))

this.editor.getBuffer().history.clearUndoStack()
this.editor.getBuffer().history.clearRedoStack()
// Removed - Issue #93 (Uncaught TypeError: Cannot read property 'clearUndoStack' of undefined)
// this.editor.getBuffer().history.clearUndoStack()
// this.editor.getBuffer().history.clearRedoStack()

if (initialData) { this.editor.setText(initialData) }
}
Expand Down