mn-angular-lib 1.0.110 → 1.0.111

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.
@@ -7588,10 +7588,17 @@ class MnModalService {
7588
7588
  const componentRef = createComponent(MnModalShellComponent, {
7589
7589
  environmentInjector: this.injector,
7590
7590
  });
7591
+ // Work off a mutable shallow copy of the (frozen) builder config, shared by
7592
+ // both the shell and the ref. `ModalBuilder.build()` returns a frozen object;
7593
+ // `MnModalRef.update()` mutates the config in place (so the shell, which holds
7594
+ // the same reference, sees the change), which would throw on a frozen object.
7595
+ // Cloning here keeps the caller's built config immutable while giving the
7596
+ // runtime an extensible object to update (e.g. footer actions set at runtime).
7597
+ const workingConfig = { ...config };
7591
7598
  // TModel is erased at the shell boundary — the shell only needs TResult
7592
- componentRef.instance.config = config;
7599
+ componentRef.instance.config = workingConfig;
7593
7600
  // Create modal ref
7594
- const modalRef = new MnModalRef(componentRef, config);
7601
+ const modalRef = new MnModalRef(componentRef, workingConfig);
7595
7602
  componentRef.instance.modalRef = modalRef;
7596
7603
  // Update stack and dim previous modal
7597
7604
  if (this.modalStack.length > 0) {