Skip to content

Commit

Permalink
Merge pull request #20534 from apache/fix/potential-NPE
Browse files Browse the repository at this point in the history
fix(data): fix potential NPE in the `SeriesData#rawIndexOf` function
  • Loading branch information
plainheart authored Nov 24, 2024
2 parents 2576fc2 + d303a5f commit 9d8454a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/data/SeriesData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9d8454a

Please sign in to comment.