Skip to content

Commit bc5bc6f

Browse files
authored
fix(GaugeChart): add compatibility check (#417)
1 parent 1c017b0 commit bc5bc6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/GaugeChart/handleSeries.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,8 @@ export function handleStatus(seriesUnit, iChartOption,radiusSize,text,sizeData,i
488488
}
489489
seriesUnit.color = color;
490490

491-
let name = iChartOption.data[0].name;
492-
let unit = iChartOption.unit;
491+
let name = iChartOption.data?.[0]?.name || '';
492+
let unit = iChartOption.unit || '';
493493
seriesUnit.detail = {
494494
valueAnimation: true,
495495
offsetCenter: [0, 0],

0 commit comments

Comments
 (0)