DLynch has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/349161 )
Change subject: MWReferenceNode: Don't try to remove from the internal list if it's not added ...................................................................... MWReferenceNode: Don't try to remove from the internal list if it's not added Recent changes to setRoot in ve core (719f8c667) cause unroot to occur at a point we weren't expecting, when adding a new reference. Bug: T163267 Change-Id: If02ea08bb8b6db3be41d51ab44ce2a74cfe07914 --- M modules/ve-cite/ve.dm.MWReferenceNode.js 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite refs/changes/61/349161/1 diff --git a/modules/ve-cite/ve.dm.MWReferenceNode.js b/modules/ve-cite/ve.dm.MWReferenceNode.js index 4da71c9..ceea160 100644 --- a/modules/ve-cite/ve.dm.MWReferenceNode.js +++ b/modules/ve-cite/ve.dm.MWReferenceNode.js @@ -391,6 +391,10 @@ * Unregister the node from the internal list */ ve.dm.MWReferenceNode.prototype.removeFromInternalList = function () { + if ( !this.registeredListGroup ) { + // Don't try to remove if we haven't been added in the first place. + return; + } this.getDocument().getInternalList().removeNode( this.registeredListGroup, this.registeredListKey, -- To view, visit https://gerrit.wikimedia.org/r/349161 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If02ea08bb8b6db3be41d51ab44ce2a74cfe07914 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cite Gerrit-Branch: master Gerrit-Owner: DLynch <dly...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits