@wolkabout/commons 0.0.40 → 0.0.42

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.
@@ -527,6 +527,9 @@ class FeatureRegistry {
527
527
  * Emits the registered features once all external modules loaded (successfully or unsuccessfully).
528
528
  */
529
529
  loadExternalFeatures(features) {
530
+ if (!features || features.length === 0) {
531
+ this.noExternalModules();
532
+ }
530
533
  forkJoin(features.map((feature) => from(loadRemoteModule(feature.remote, feature.feature)).pipe(map(module => module.default), catchError((error) => {
531
534
  console.warn("Unable to load: ", feature.remote + '/' + feature.feature, error);
532
535
  return of(null);
@@ -541,7 +544,7 @@ class FeatureRegistry {
541
544
  }
542
545
  registerFeature(feature) {
543
546
  this.loadedFeatures.push(feature);
544
- runInInjectionContext(this.injector, () => feature.init?.());
547
+ runInInjectionContext(this.injector, feature.init ?? (() => { }));
545
548
  console.info('Loaded feature: ', feature.name);
546
549
  }
547
550
  get features$() {