Skip to content

Commit 938c9b6

Browse files
authored
fix: fix line renderer without data (#1229)
1 parent 942f557 commit 938c9b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plots/line/layer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export default class LineLayer<T extends LineLayerConfig = LineLayerConfig> exte
166166
this.setConfig('scales', scales);
167167
trySetScaleMinToZero(
168168
scales[props.yField],
169-
map(props.data as any, (item) => item[props.yField])
169+
map(props.data || [], (item) => item[props.yField])
170170
);
171171
super.scale();
172172
}

0 commit comments

Comments
 (0)