Removing optional chaining, not valid in Node.

This commit is contained in:
mike12345567 2021-07-23 13:07:10 +01:00
parent 520651119b
commit e24c6bafd1
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