From 4fbe37ff0e27737837a81bf23321ca46cb1fd31c Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 23 Jul 2021 13:07:10 +0100 Subject: [PATCH] Removing optional chaining, not valid in Node. --- packages/server/src/api/controllers/row/internalSearch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/api/controllers/row/internalSearch.js b/packages/server/src/api/controllers/row/internalSearch.js index 041f030477..148ba3806f 100644 --- a/packages/server/src/api/controllers/row/internalSearch.js +++ b/packages/server/src/api/controllers/row/internalSearch.js @@ -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