mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Fix save dialog crash on load error
If there was an error loading the HTML from Parsoid, ViewPageTarget would try to tear down the save dialog, which caused a crash because the save dialog doesn't exist yet at that point. Change-Id: Ia50756a19cb775be96b90e87b642eb2a38f254ce
This commit is contained in:
parent
324b04137b
commit
9d915aca2d
|
@ -196,8 +196,11 @@ ve.init.mw.ViewPageTarget.prototype.deactivate = function ( override ) {
|
|||
this.detachToolbarButtons();
|
||||
}
|
||||
|
||||
if ( this.saveDialog ) {
|
||||
// If we got as far as setting up the save dialog, tear it down
|
||||
this.saveDialog.reset();
|
||||
this.saveDialog.close();
|
||||
}
|
||||
// Check we got as far as setting up the surface
|
||||
if ( this.active ) {
|
||||
// If we got as far as setting up the surface, tear that down
|
||||
|
|
Loading…
Reference in a new issue