From d303a5f0a713cd7c36ab2bb99e3b6e5c701a2461 Mon Sep 17 00:00:00 2001 From: plainheart Date: Sat, 23 Nov 2024 10:03:01 +0800 Subject: [PATCH] fix(data): fix potential NPE in the `SeriesData#rawIndexOf` function --- src/data/SeriesData.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/SeriesData.ts b/src/data/SeriesData.ts index ecf3e03f81..456ddeceb6 100644 --- a/src/data/SeriesData.ts +++ b/src/data/SeriesData.ts @@ -866,7 +866,7 @@ class SeriesData< throw new Error('Do not supported yet'); } } - const rawIndex = invertedIndices[value]; + const rawIndex = invertedIndices && invertedIndices[value]; if (rawIndex == null || isNaN(rawIndex)) { return INDEX_NOT_FOUND; }