Followup 00af434: only tear down debug bar if it exists

Bug: 66692
Change-Id: I3ec8cf9579da785327abbab5dd3618bb3f20895f
This commit is contained in:
Roan Kattouw 2014-06-16 15:54:12 -07:00
parent 00af43495b
commit ee1bea701e

View file

@ -1383,10 +1383,12 @@ ve.init.mw.ViewPageTarget.prototype.tearDownToolbar = function () {
* @method
*/
ve.init.mw.ViewPageTarget.prototype.tearDownDebugBar = function () {
this.debugBar.$element.slideUp( 'fast', ve.bind( function () {
this.debugBar.$element.remove();
this.debugBar = null;
}, this ) );
if ( this.debugBar ) {
this.debugBar.$element.slideUp( 'fast', ve.bind( function () {
this.debugBar.$element.remove();
this.debugBar = null;
}, this ) );
}
};
/**