diff --git a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js index 89b0a93a2e..09df201316 100644 --- a/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve/init/mw/targets/ve.init.mw.ViewPageTarget.js @@ -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(); + } }; /**