fix initial load bug in browser
This commit is contained in:
@@ -6,7 +6,10 @@ declare const fb
|
||||
export class DashboardService {
|
||||
constructor() { }
|
||||
|
||||
getWidgetConfigs(): Promise<string[]> {
|
||||
async getWidgetConfigs(): Promise<string[]> {
|
||||
while(!fb.PluginManager){
|
||||
await new Promise((resolve) => setTimeout(resolve, 50))
|
||||
}
|
||||
return fb.PluginManager.getLoadedPluginNames()
|
||||
}
|
||||
|
||||
|
||||
@@ -41,9 +41,7 @@ export class DashboardComponent implements AfterViewInit {
|
||||
private injector: Injector) { }
|
||||
|
||||
ngAfterViewInit() {
|
||||
setTimeout( () => {
|
||||
this.loadWidgets();
|
||||
}, 250)
|
||||
}
|
||||
|
||||
private async loadWidgets() {
|
||||
|
||||
Reference in New Issue
Block a user