Skip to content

Commit 983f6f1

Browse files
ESadouskinnixaa
authored andcommitted
akveo#135 Fixed loading for IE (akveo#175)
1 parent aa1a81c commit 983f6f1

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/app/theme/components/baAmChart/baAmChart.component.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,15 @@ export class BaAmChart {
3434

3535
private _loadChartsLib():void {
3636
BaThemePreloader.registerLoader(new Promise((resolve, reject) => {
37-
AmCharts.ready(function(){
38-
resolve('AmCharts ready');
39-
});
37+
let amChartsReadyMsg = 'AmCharts ready';
38+
39+
if (AmCharts.isReady) {
40+
resolve(amChartsReadyMsg);
41+
} else {
42+
AmCharts.ready(function () {
43+
resolve(amChartsReadyMsg);
44+
});
45+
}
4046
}));
4147
}
4248
}

0 commit comments

Comments
 (0)