Don't error when trying to re-use a reference as itself.

Bug: T90476
Change-Id: I0e2cafa885f5606c4f6611529f11de4fa6f7aedf
This commit is contained in:
Alex Monk 2015-09-24 22:57:50 +01:00
parent 6904180054
commit 03a1d04bde

View file

@ -273,7 +273,7 @@ ve.ui.MWReferenceDialog.prototype.useReference = function ( ref ) {
group = this.getFragment().getDocument().getInternalList()
.getNodeGroup( this.referenceModel.getListGroup() );
if ( group && group.keyedNodes[ this.referenceModel.getListKey() ].length > 1 ) {
if ( ve.getProp( group, 'keyedNodes', this.referenceModel.getListKey(), 'length' ) > 1 ) {
this.$reuseWarning.removeClass( 'oo-ui-element-hidden' );
this.$reuseWarningText.text( mw.msg(
'visualeditor-dialog-reference-editing-reused',