mw.widgets.CategoryMultiselectWidget: Fix exception on invalid input

Bug: T262466
Change-Id: Ia17d4631bac516c795be173e467cfa61b1c6c254
This commit is contained in:
Bartosz Dziewoński 2021-03-13 00:29:03 +01:00
parent dfb3fe9bee
commit b485fcd16a

View file

@ -185,6 +185,17 @@
return deferred.promise();
};
/**
* @inheritdoc
*/
mw.widgets.CategoryMultiselectWidget.prototype.isAllowedData = function ( data ) {
var title = mw.Title.makeTitle( NS_CATEGORY, data );
if ( !title ) {
return false;
}
return mw.widgets.CategoryMultiselectWidget.parent.prototype.isAllowedData.call( this, data );
};
/**
* @inheritdoc
*/