fix: add back localCategories to categorySearch when defaultCategories is supplied

This commit is contained in:
Julian Lam
2025-04-09 10:55:32 -04:00
parent 93a5b35f33
commit d58d5861d9

View File

@@ -13,6 +13,9 @@ define('categorySearch', ['alerts', 'bootstrap', 'api'], function (alerts, boots
let localCategories = [];
if (Array.isArray(options.localCategories)) {
localCategories = options.localCategories.map(c => ({ ...c }));
if (categoriesList) {
categoriesList = [...localCategories, ...categoriesList];
}
}
options.selectedCids = options.selectedCids || ajaxify.data.selectedCids || [];