Skip to content

Commit

Permalink
fix(component): update error message when component is not registered
Browse files Browse the repository at this point in the history
  • Loading branch information
why520crazy committed Dec 18, 2020
1 parent 179040d commit 71a331a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe('PlanetComponentLoader', () => {

expect(() => {
loadApp1Component(app2ModuleRef);
}).toThrowError(`${app1Name} not registered components`);
}).toThrowError(`${app1Name}'s component(app1-projects) is not registered`);

registerAppComponents(app1ModuleRef);
tick();
Expand Down
2 changes: 1 addition & 1 deletion packages/planet/src/component/planet-component-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class PlanetComponentLoader {
if (componentFactory) {
return componentFactory<TData, TComp>(componentName, config);
} else {
throw new Error(`${app} not registered components`);
throw new Error(`${app}'s component(${componentName}) is not registered`);
}
}),
finalize(() => {
Expand Down

0 comments on commit 71a331a

Please sign in to comment.