mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
Merge "Account for categories being removed twice in MWCategoryWidget"
This commit is contained in:
commit
df52c9bd0b
|
@ -308,9 +308,11 @@ ve.ui.MWCategoryWidget.prototype.removeItems = function ( names ) {
|
|||
|
||||
for ( i = 0, len = names.length; i < len; i++ ) {
|
||||
categoryItem = this.categories[names[i]];
|
||||
categoryItem.disconnect( this );
|
||||
items.push( categoryItem );
|
||||
delete this.categories[names[i]];
|
||||
if ( categoryItem ) {
|
||||
categoryItem.disconnect( this );
|
||||
items.push( categoryItem );
|
||||
delete this.categories[names[i]];
|
||||
}
|
||||
}
|
||||
|
||||
OO.ui.GroupElement.prototype.removeItems.call( this, items );
|
||||
|
|
Loading…
Reference in a new issue