From ddc056a40a305c6be31bd7e296598dfbd1f8e46c Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Mon, 2 Oct 2017 16:26:16 +0100 Subject: [PATCH] MWExtensionWindow: Always send a string to setValueAndWhitespace Bug: T177180 Change-Id: I3a32e1b22e82bc0c182d26a952e7592aafd4b5e4 --- modules/ve-mw/ui/ve.ui.MWExtensionWindow.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ve-mw/ui/ve.ui.MWExtensionWindow.js b/modules/ve-mw/ui/ve.ui.MWExtensionWindow.js index 748b3338ea..0529b2cd40 100644 --- a/modules/ve-mw/ui/ve.ui.MWExtensionWindow.js +++ b/modules/ve-mw/ui/ve.ui.MWExtensionWindow.js @@ -83,7 +83,7 @@ ve.ui.MWExtensionWindow.prototype.getSetupProcess = function ( data, process ) { if ( this.selectedNode ) { mwData = this.selectedNode.getAttribute( 'mw' ); // mwData.body can be null in extensions - this.input.setValueAndWhitespace( mwData.body && mwData.body.extsrc ); + this.input.setValueAndWhitespace( ( mwData.body && mwData.body.extsrc ) || '' ); this.originalMwData = mwData; } else { if ( !this.constructor.static.modelClasses[ 0 ].static.isContent ) {