From 6f2e6c4cb24c780210aa5a8a56d89d66b721faf4 Mon Sep 17 00:00:00 2001 From: GuoQing Liu <842607283@qq.com> Date: Fri, 8 Aug 2025 23:22:08 +0800 Subject: [PATCH] Fix if search word is number will be crash (#19426) * fix: fix if filterValues is number will be crash * chore: use String function cover filterValues --- web/src/components/input/InputWithTags.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 web/src/components/input/InputWithTags.tsx diff --git a/web/src/components/input/InputWithTags.tsx b/web/src/components/input/InputWithTags.tsx old mode 100644 new mode 100755 index 0e29c3015..413dd64b1 --- a/web/src/components/input/InputWithTags.tsx +++ b/web/src/components/input/InputWithTags.tsx @@ -420,11 +420,11 @@ export default function InputWithTags({ ? t("button.yes", { ns: "common" }) : t("button.no", { ns: "common" }); } else if (filterType === "labels") { - return getTranslatedLabel(filterValues as string); + return getTranslatedLabel(String(filterValues)); } else if (filterType === "search_type") { - return t("filter.searchType." + (filterValues as string)); + return t("filter.searchType." + String(filterValues)); } else { - return (filterValues as string).replaceAll("_", " "); + return String(filterValues).replaceAll("_", " "); } }