Skip to content

Commit

Permalink
fix(component-loader): fix load component error when preload app
Browse files Browse the repository at this point in the history
  • Loading branch information
walkerkay committed Nov 18, 2020
1 parent 1eae06e commit edd4ea3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/planet/src/application/planet-application-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,8 @@ export class PlanetApplicationLoader {
switchMap(() => {
return this.ngZone.runOutsideAngular(() => {
return this.takeOneStable().pipe(
tap(() => {
this.bootstrapApp(app, 'hidden').subscribe();
switchMap(() => {
return this.bootstrapApp(app, 'hidden');
}),
map(() => {
return getPlanetApplicationRef(app.name);
Expand Down
2 changes: 0 additions & 2 deletions packages/planet/src/component/planet-component-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ export class PlanetComponentLoader {
} else {
const app = this.applicationService.getAppByName(name);
return this.applicationLoader.preload(app).pipe(
// Because register use 'setTimeout',so delay 50
delay(200),
map(() => {
return globalPlanet.apps[name];
})
Expand Down

0 comments on commit edd4ea3

Please sign in to comment.