Update packages/core/utils/lib/operators.js

Co-authored-by: Jean-Sébastien Herbaux <jean-sebastien.herbaux@epitech.eu>
This commit is contained in:
Ben Irvin 2023-05-12 16:48:18 +02:00 committed by Convly
parent 32dc008197
commit 1c0c28fb0d

View File

@ -58,7 +58,7 @@ const OPERATORS_LOWERCASE = Object.fromEntries(
const isOperatorOfType = (type, key, ignoreCase = false) => {
if (ignoreCase) {
return OPERATORS_LOWERCASE[type]?.includes(key.toLowerCase());
return OPERATORS_LOWERCASE[type]?.includes(key.toLowerCase()) ?? false;
}
return OPERATORS[type]?.includes(key);
};