Don't allow document save if we're already tearing down the surface

Otherwise you get "Uncaught TypeError: Cannot read property 'messages' of null"
if you press the save button late enough in the saving process. The bug refers
to a different error which I have not been able to reproduce.

Bug: 68073
Change-Id: Ia8fa325f1450329b6e0e4ee9af5302aa4857d637
This commit is contained in:
Alex Monk 2014-07-16 17:50:41 +01:00
parent 97d286aa0f
commit b9ad2fb406

View file

@ -865,6 +865,10 @@ ve.init.mw.ViewPageTarget.prototype.onSaveDialogReviewComplete = function ( wiki
* succeeds/fails.
*/
ve.init.mw.ViewPageTarget.prototype.saveDocument = function ( saveDeferred ) {
if ( this.deactivating ) {
return false;
}
var saveOptions = this.getSaveOptions();
this.emit( 'saveInitiated' );