From 04f32962341a0ec68264aeada9222b27f08ccb4e Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Tue, 25 Mar 2014 13:47:24 -0700 Subject: [PATCH] Rename stray this.refGroup usage to this.group in MWReferenceModel this.refGroup is only ever read and never written, so obviously it's always undefined. And it turns out that creating references with listGroup='mwReference/undefined' crashes when you try to remove them again. Bug: 63085 Change-Id: Id326208bd6b3fe3b602ed6e3b57b7ea06d8ceb2c --- modules/ve-mw/dm/models/ve.dm.MWReferenceModel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ve-mw/dm/models/ve.dm.MWReferenceModel.js b/modules/ve-mw/dm/models/ve.dm.MWReferenceModel.js index dff9ac5f7c..93ec0306b9 100644 --- a/modules/ve-mw/dm/models/ve.dm.MWReferenceModel.js +++ b/modules/ve-mw/dm/models/ve.dm.MWReferenceModel.js @@ -83,7 +83,7 @@ ve.dm.MWReferenceModel.prototype.insertInternalItem = function ( surfaceModel ) // Fill in data this.setListKey( 'auto/' + internalList.getNextUniqueNumber() ); - this.setListGroup( 'mwReference/' + this.refGroup ); + this.setListGroup( 'mwReference/' + this.group ); // Insert internal reference item into document item = internalList.getItemInsertion( this.listGroup, this.listKey, [] ); @@ -172,7 +172,7 @@ ve.dm.MWReferenceModel.prototype.insertReferenceNode = function ( surfaceModel, 'listKey': this.listKey, 'listGroup': this.listGroup, 'listIndex': this.listIndex, - 'refGroup': this.refGroup + 'refGroup': this.group } }, { 'type': '/mwReference' }