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:
Trevor Parscal 2013-01-08 12:27:44 -08:00
parent 31c6d9832d
commit ec5333030b

View file

@ -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();
}
};
/**