File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments