Removing optional chaining, not valid in Node.

This commit is contained in:
mike12345567 2021-07-23 13:07:10 +01:00
parent a5e27e1387
commit 4fbe37ff0e
1 changed files with 2 additions and 2 deletions

View File

@ -17,8 +17,8 @@ const preprocess = (
const originalType = typeof value
// Convert to lowercase
if (options.lowercase) {
value = value?.toLowerCase ? value.toLowerCase() : value
if (value && options.lowercase) {
value = value.toLowerCase ? value.toLowerCase() : value
}
// Escape characters