Skip to content

Commit 501d436

Browse files
author
aptmac
authored
fix(c3-chart): revise condition for re-generating donut-pct-charts to use 'indexOf' instead of 'includes'
1 parent fd1caab commit 501d436

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/charts/c3/c3-chart.component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
chartData.bindto = '#' + $attrs.id;
100100
// only re-generate donut pct chart if it has a threshold object
101101
// because it's colors will change based on data and thresholds
102-
if (!chart || ($attrs.id.includes('donutPctChart') && chartData.thresholds)) {
102+
if (!chart || ($attrs.id.indexOf('donutPctChart') !== -1 && chartData.thresholds)) {
103103
chart = c3.generate(chartData);
104104
} else {
105105
//if chart is already created, then we only need to re-load data

0 commit comments

Comments
 (0)