mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 06:46:26 +00:00
Avoid crash after ve.dm.Surface.purgeHistory().
The selection property is never null; it is initialized to Range(0,0). If it is set to null in purgeHistory(), the next call to ve.dm.Surface.change() will crash. Change-Id: Ia45c0ba26291e8ad09c445fdf2323710b5ab409f
This commit is contained in:
parent
d0d0e156b8
commit
7fb7665608
|
@ -125,7 +125,7 @@ ve.dm.Surface.prototype.purgeHistory = function () {
|
|||
if ( !this.enabled ) {
|
||||
return;
|
||||
}
|
||||
this.selection = null;
|
||||
this.selection = new ve.Range( 0, 0 );
|
||||
this.smallStack = [];
|
||||
this.bigStack = [];
|
||||
this.undoIndex = 0;
|
||||
|
|
Loading…
Reference in a new issue