mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
Merge "Replace jQuery.grep with Array.prototype.filter"
This commit is contained in:
commit
15df919bc1
|
@ -367,7 +367,7 @@ ve.ui.MWCategoryWidget.prototype.addItems = function ( items, index ) {
|
|||
// Index item
|
||||
widget.categories[ itemTitle.getMainText() ] = categoryItem;
|
||||
// Copy sortKey from old item when "moving"
|
||||
existingCategoryItems = $.grep( widget.items, checkValueMatches );
|
||||
existingCategoryItems = widget.items.filter( checkValueMatches );
|
||||
if ( existingCategoryItems.length ) {
|
||||
// There should only be one element in existingCategoryItems
|
||||
categoryItem.sortKey = existingCategoryItems[ 0 ].sortKey;
|
||||
|
|
Loading…
Reference in a new issue