From 716bb8574d602ffc99250d66813989be63b1e696 Mon Sep 17 00:00:00 2001 From: Hiroshi Fujita Date: Sun, 29 Dec 2024 12:52:45 +0900 Subject: [PATCH] fix: rendering errors occur when displaying hit test results in full text search (#12191) --- web/app/components/datasets/hit-testing/components/score.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/app/components/datasets/hit-testing/components/score.tsx b/web/app/components/datasets/hit-testing/components/score.tsx index 115141eaaa0406..175b00b7e7f609 100644 --- a/web/app/components/datasets/hit-testing/components/score.tsx +++ b/web/app/components/datasets/hit-testing/components/score.tsx @@ -4,7 +4,7 @@ import React from 'react' import cn from '@/utils/classnames' type Props = { - value: number + value: number | null besideChunkName?: boolean } @@ -12,6 +12,9 @@ const Score: FC = ({ value, besideChunkName, }) => { + if (!value) + return null + return (