From ee1bea701e49332821e33c04d960037ed00cf0f5 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 16 Jun 2014 15:54:12 -0700 Subject: [PATCH] Followup 00af434: only tear down debug bar if it exists Bug: 66692 Change-Id: I3ec8cf9579da785327abbab5dd3618bb3f20895f --- .../ve-mw/init/targets/ve.init.mw.ViewPageTarget.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js index 972c68cdd6..54c8b8ff96 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -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 ) ); + } }; /**