-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Won't Fix
-
Affects Version/s: 2.4.0
-
Fix Version/s: None
-
Component/s: Selectivity
-
Tags:
-
Backlog priority:650
selectivity.js contains this function which throws an error if a non valid item is found
Selectivity.processItem = function(item) { if (Selectivity.isValidId(item)) { return { id: item, text: '' + item }; } else if (item && (Selectivity.isValidId(item.id) || item.children) && isString(item.text)) { if (item.children) { item.children = Selectivity.processItems(item.children); } return item; } else { throw new Error('invalid item'); } };
It may happen that an invalid item is returned as an ES aggregate bucket and in this case, the element should be robust not to crash the entire application.
Would it be possible to ignore the invalid item and only log an error in the console? Or find another solution?
- is related to
-
ELEMENTS-938 Improve idFunction handling of empty ids
- Resolved