From 8b38ade1b9eaa0ff3529e1663ae2f2a6d8704de7 Mon Sep 17 00:00:00 2001 From: newtextdoc1111 Date: Sun, 13 Jul 2025 22:48:36 +0900 Subject: [PATCH] fix: Add optional chaining to prevent errors in isLongText function --- web/js/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/js/utils.js b/web/js/utils.js index 203fbc2..1d82a8e 100644 --- a/web/js/utils.js +++ b/web/js/utils.js @@ -52,7 +52,7 @@ const REG_WILDCARD_SIMPLE_WORD = /[^{}_|]+/g; * @return {boolean} True if the text is longer than the maximum tag length, false otherwise. */ export function isLongText(text) { - return text.length > settingValues._maxTagLength; + return text?.length > settingValues._maxTagLength; } /**