Merge "Account for categories being removed twice in MWCategoryWidget"

This commit is contained in:
jenkins-bot 2014-09-30 22:10:31 +00:00 committed by Gerrit Code Review
commit df52c9bd0b

View file

@ -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 );