mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-15 10:59:56 +00:00
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
This commit is contained in:
parent
1fe0fb2e70
commit
4841b7496c
|
@ -395,6 +395,10 @@ ve.dm.MWReferenceNode.prototype.addToInternalList = function () {
|
|||
* 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,
|
||||
|
|
Loading…
Reference in a new issue