mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Initialization error when canceling load
Added check for the existence of the surface before the save dialog is hidden. This oversight caused errors when there was a load error and the user clicked cancel. Change-Id: I3b6d8d4d9f4c81ffcbd7996d6b17ac04f33bf6d7
This commit is contained in:
parent
31c6d9832d
commit
ec5333030b
|
@ -1136,7 +1136,9 @@ ve.init.mw.ViewPageTarget.prototype.hideSaveDialog = function () {
|
|||
$( document ).off( 'keydown.ve-savedialog' );
|
||||
$( window ).off( 'resize', this.onResizeSaveDialog );
|
||||
|
||||
this.surface.enable();
|
||||
if ( this.surface ) {
|
||||
this.surface.enable();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue