From a789ef64ac2c1ef02a6b6129491d0e7a5ea1f694 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Thu, 6 Feb 2014 14:12:04 +0000 Subject: [PATCH] Always pass a document model to the surface widget For consistency, in all other cases newDoc is a document model. Related to the documentation change in Ie1ee9bd958b3, but not strictly dependent on it. Change-Id: I98ade6abd49ebd37d8eb8005e349b89b318d9421 --- modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js index a5c04cb7b8..3040122bd4 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js @@ -286,12 +286,12 @@ ve.ui.MWMediaEditDialog.prototype.setup = function ( data ) { if ( this.captionNode && this.captionNode.getLength() > 0 ) { newDoc = doc.cloneFromRange( this.captionNode.getRange() ); } else { - newDoc = [ + newDoc = new ve.dm.Document( [ { 'type': 'paragraph', 'internal': { 'generated': 'wrapper' } }, { 'type': '/paragraph' }, { 'type': 'internalList' }, { 'type': '/internalList' } - ]; + ] ); } this.captionSurface = new ve.ui.SurfaceWidget(