@kithinji/orca 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1817,7 +1817,12 @@ var kithinjiorca = (() => {
1817
1817
  if (!ComponentClass) {
1818
1818
  throw new Error(`Component ${name} not found in ${path}`);
1819
1819
  }
1820
- [...params, ComponentClass].forEach((p) => injector.addProvider(p));
1820
+ injector.addProvider({
1821
+ provide: ComponentClass,
1822
+ useClass: ComponentClass,
1823
+ scope: "transient"
1824
+ });
1825
+ [...params].forEach((p) => injector.addProvider(p));
1821
1826
  const cleanProps = { ...props };
1822
1827
  delete cleanProps.__clientComponent;
1823
1828
  const componentInstance = injector.resolve(ComponentClass);
@@ -2020,12 +2025,7 @@ var kithinjiorca = (() => {
2020
2025
  try {
2021
2026
  instance = injector.resolve(ComponentClass);
2022
2027
  } catch (e) {
2023
- injector.addProvider({
2024
- provide: ComponentClass,
2025
- useClass: ComponentClass,
2026
- scope: "transient"
2027
- });
2028
- instance = injector.resolve(ComponentClass);
2028
+ throw new Error(e.message);
2029
2029
  }
2030
2030
  const localProviders = Reflect.getMetadata(COMPONENT_PROVIDERS, ComponentClass) || [];
2031
2031
  if (localProviders.length > 0) {