MWExtensionWindow: Always send a string to setValueAndWhitespace

Bug: T177180
Change-Id: I3a32e1b22e82bc0c182d26a952e7592aafd4b5e4
This commit is contained in:
Ed Sanders 2017-10-02 16:26:16 +01:00
parent 852e1ababe
commit ddc056a40a

View file

@ -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 <selfclosing/> 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 ) {