Skip to content

Commit 71a331a

Browse files
committed
fix(component): update error message when component is not registered
1 parent 179040d commit 71a331a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/planet/src/component/planet-component-loader.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ describe('PlanetComponentLoader', () => {
6464

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

6969
registerAppComponents(app1ModuleRef);
7070
tick();

packages/planet/src/component/planet-component-loader.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export class PlanetComponentLoader {
157157
if (componentFactory) {
158158
return componentFactory<TData, TComp>(componentName, config);
159159
} else {
160-
throw new Error(`${app} not registered components`);
160+
throw new Error(`${app}'s component(${componentName}) is not registered`);
161161
}
162162
}),
163163
finalize(() => {

0 commit comments

Comments
 (0)