From 50c48a1cac40196ff379638a2b5ad4dd206e3119 Mon Sep 17 00:00:00 2001 From: Rob Moen Date: Fri, 10 May 2013 16:07:05 -0700 Subject: [PATCH] Fix check for existing category in article. Now looking inside existingCategories array for category string vs item object. When adding side by side duplicate categories, category is now in correct section of menu. Change-Id: I40dd30d80fb8bf818c077512468d630a5cb84120 --- modules/ve/ui/widgets/ve.ui.MWCategoryInputWidget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ve/ui/widgets/ve.ui.MWCategoryInputWidget.js b/modules/ve/ui/widgets/ve.ui.MWCategoryInputWidget.js index e7cbbf5bfe..f54f0b3953 100644 --- a/modules/ve/ui/widgets/ve.ui.MWCategoryInputWidget.js +++ b/modules/ve/ui/widgets/ve.ui.MWCategoryInputWidget.js @@ -116,7 +116,7 @@ ve.ui.MWCategoryInputWidget.prototype.getLookupMenuItemsFromData = function ( da for ( i = 0, len = matchingCategories.length; i < len; i++ ) { item = matchingCategories[i]; if ( - existingCategoryItems.indexOf( item ) === -1 && + existingCategoryItems.indexOf( category.value ) === -1 && item.match( pattern ) ) { if ( item === category.value ) {