Fix logical conflicts from the transclusion merge.

Change-Id: Ic9d708cdba74c908d14839def5050c8825134c56
This commit is contained in:
Ed Sanders 2013-06-17 10:36:47 +01:00
parent 409afcbce9
commit 642a84483e
2 changed files with 3 additions and 4 deletions

View file

@ -176,7 +176,7 @@ ve.dm.MWTransclusionModel.prototype.getPlainObject = function () {
// Use single-part format when possible
if ( obj.parts.length === 1 ) {
obj = this.content.parts[0].template;
obj = obj.parts[0].template;
}
return obj;

View file

@ -97,11 +97,10 @@ ve.ui.MWTransclusionDialog.prototype.onClose = function ( action ) {
// TODO: Wrap attribute changes in ve.dm.SurfaceFragment
surfaceModel.change(
ve.dm.Transaction.newFromAttributeChange(
ve.dm.Transaction.newFromAttributeChanges(
surfaceModel.getDocument(),
this.node.getOffset(),
'mw',
this.transclusion.getPlainObject()
{ 'mw': this.transclusion.getPlainObject() }
)
);
}