Skip to content

Commit f096657

Browse files
authored
Prevent error when removing data in point sample (#455)
1 parent ec33114 commit f096657

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/samples/types/point.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ const config = {
7272
// <block:utils:3>
7373
function value(ctx, datasetIndex, index, prop) {
7474
const meta = ctx.chart.getDatasetMeta(datasetIndex);
75-
return meta.controller.getParsed(index)[prop];
75+
const parsed = meta.controller.getParsed(index);
76+
return parsed ? parsed[prop] : NaN;
7677
}
7778
// </block:utils>
7879

0 commit comments

Comments
 (0)