mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 16:20:52 +00:00
Merge "Always use multi-part format for transclusions"
This commit is contained in:
commit
51a1d4da39
|
@ -59,6 +59,7 @@ ve.dm.MWTransclusionModel.prototype.load = function ( data ) {
|
|||
var i, len, part;
|
||||
|
||||
// Convert single part format to multi-part format
|
||||
// Parsoid doesn't use this format any more, but we accept it for backwards compatibility
|
||||
if ( data.params && data.target ) {
|
||||
data = { 'parts': [ { 'template': data } ] };
|
||||
}
|
||||
|
@ -244,11 +245,6 @@ ve.dm.MWTransclusionModel.prototype.getPlainObject = function () {
|
|||
return null;
|
||||
}
|
||||
|
||||
// Use single-part format when possible
|
||||
if ( obj.parts.length === 1 ) {
|
||||
obj = obj.parts[0].template;
|
||||
}
|
||||
|
||||
return obj;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue