|
|
@ -96,17 +96,23 @@ async function retrieveRecordsAndValidate( |
|
|
|
); |
|
|
|
); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'lt': |
|
|
|
case 'lt': |
|
|
|
expectedRecords = unfilteredRecords.filter( |
|
|
|
expectedRecords = unfilteredRecords.filter((record) => |
|
|
|
(record) => |
|
|
|
title === 'Rating' |
|
|
|
(toFloat ? parseFloat(record[title]) : record[title]) < |
|
|
|
? (toFloat ? parseFloat(record[title]) : record[title]) < |
|
|
|
|
|
|
|
(toFloat ? parseFloat(filter.value) : filter.value) || |
|
|
|
|
|
|
|
record[title] === null |
|
|
|
|
|
|
|
: (toFloat ? parseFloat(record[title]) : record[title]) < |
|
|
|
(toFloat ? parseFloat(filter.value) : filter.value) && |
|
|
|
(toFloat ? parseFloat(filter.value) : filter.value) && |
|
|
|
record[title] !== null |
|
|
|
record[title] !== null |
|
|
|
); |
|
|
|
); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'lte': |
|
|
|
case 'lte': |
|
|
|
expectedRecords = unfilteredRecords.filter( |
|
|
|
expectedRecords = unfilteredRecords.filter((record) => |
|
|
|
(record) => |
|
|
|
title === 'Rating' |
|
|
|
(toFloat ? parseFloat(record[title]) : record[title]) <= |
|
|
|
? (toFloat ? parseFloat(record[title]) : record[title]) <= |
|
|
|
|
|
|
|
(toFloat ? parseFloat(filter.value) : filter.value) || |
|
|
|
|
|
|
|
record[title] === null |
|
|
|
|
|
|
|
: (toFloat ? parseFloat(record[title]) : record[title]) <= |
|
|
|
(toFloat ? parseFloat(filter.value) : filter.value) && |
|
|
|
(toFloat ? parseFloat(filter.value) : filter.value) && |
|
|
|
record[title] !== null |
|
|
|
record[title] !== null |
|
|
|
); |
|
|
|
); |
|
|
|