jenkins-bot has submitted this change and it was merged.

Change subject: Don't compute the end offset to pass to insertMeta()
......................................................................


Don't compute the end offset to pass to insertMeta()

Omitting the offset causes insertMeta() to automatically use the
end offset, so we don't need to compute it in two places. The two
computations were also slightly different.

Change-Id: I55543fdd113a6a986899c093733191df948acb2e
---
M modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Esanders: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js 
b/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js
index 0a3188f..1b0ffeb 100644
--- a/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js
+++ b/modules/ve/ui/dialogs/ve.ui.MWMetaDialog.js
@@ -416,8 +416,7 @@
  * @param {Object} metaBase meta list insert object
  */
 ve.ui.MWMetaDialog.prototype.insertMetaListItem = function ( metaBase ) {
-       var offset = this.surface.getModel().getDocument().getData().length;
-       this.metaList.insertMeta( metaBase, offset );
+       this.metaList.insertMeta( metaBase );
 };
 
 /* Registration */

-- 
To view, visit https://gerrit.wikimedia.org/r/70939
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I55543fdd113a6a986899c093733191df948acb2e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to