Fix bug w/ url in query string, w/ value=false (and js false == "")

This commit is contained in:
2023-07-03 11:11:55 -05:00
parent c38712208d
commit 317d687b22

View File

@ -699,10 +699,11 @@ class FilterUtils
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// if no value set and not 'empty' or 'not empty' operators, skip this filter // // if no value set and not 'empty' or 'not empty' operators, skip this filter //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
if ((!item.value || item.value.length == 0 || (item.value.length == 1 && item.value[0] == "")) && item.operatorValue !== "isEmpty" && item.operatorValue !== "isNotEmpty") if ((!item.value || item.value.length == 0 || (item.value.length == 1 && (item.value[0] === "" || item.value[0] === undefined))) && item.operatorValue !== "isEmpty" && item.operatorValue !== "isNotEmpty")
{ {
if (!allowIncompleteCriteria) if (!allowIncompleteCriteria)
{ {
console.log(`Discarding incomplete filter criteria: ${JSON.stringify(item)}`);
return; return;
} }
} }