From 0a3c281a491e7220c0951a4b1976c60593491e9c Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Sat, 25 May 2024 11:18:07 +0800 Subject: [PATCH] verify that the data is not null in search.js --- src/scripts/GUI/builder/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/GUI/builder/search.js b/src/scripts/GUI/builder/search.js index e337f76..68712ed 100644 --- a/src/scripts/GUI/builder/search.js +++ b/src/scripts/GUI/builder/search.js @@ -358,7 +358,7 @@ class Search { Display the search results in the log. */ function log (data, title) { - if (Object.keys(data).length) { + if (data ? (Object.keys(data).length) : false) { let RESULT_STRING = ``; (Object.keys(data)).forEach((RESULT_KEY) => { RESULT_STRING += RESULT_KEY.concat(((title) ? data[RESULT_KEY][title] : false) ? `: `.concat(data[RESULT_KEY][title]) : ``, `\n`);