mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-30 17:14:42 +00:00
Merge "Don't add body attribute to an extension node with an empty body"
This commit is contained in:
commit
1afd5651ab
|
@ -240,7 +240,7 @@ ve.ui.MWExtensionWindow.prototype.removeNode = function () {
|
|||
};
|
||||
|
||||
/**
|
||||
* Update mwData object with the new values from the inspector
|
||||
* Update mwData object with the new values from the inspector or dialog
|
||||
*
|
||||
* @param {Object} mwData MediaWiki data object
|
||||
*/
|
||||
|
@ -254,7 +254,7 @@ ve.ui.MWExtensionWindow.prototype.updateMwData = function ( mwData ) {
|
|||
value = value.replace( new RegExp( '<(/' + tagName + '\\s*>)', 'gi' ), '<$1' );
|
||||
|
||||
if ( value.trim() === '' && this.constructor.static.selfCloseEmptyBody ) {
|
||||
mwData.body = null;
|
||||
delete mwData.body;
|
||||
} else {
|
||||
mwData.body = mwData.body || {};
|
||||
mwData.body.extsrc = value;
|
||||
|
|
Loading…
Reference in a new issue