@paperless/angular 3.5.0 → 3.5.1

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.
@@ -759,10 +759,16 @@ class OverlayService {
759
759
  return this.overlay.create(overlayConfig);
760
760
  }
761
761
  _attachData(overlayRef, options) {
762
- if (options.data && typeof options.data === 'object') {
763
- for (const key of Object.keys(options.data)) {
764
- overlayRef.instance[key] = options.data[key];
762
+ if (!options.data || typeof options.data !== 'object') {
763
+ return;
764
+ }
765
+ const instance = overlayRef.instance;
766
+ for (const key of Object.keys(options.data)) {
767
+ if (typeof instance[key] === 'function') {
768
+ instance[key].set(options.data[key]);
769
+ continue;
765
770
  }
771
+ instance[key] = options.data[key];
766
772
  }
767
773
  }
768
774
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: OverlayService, deps: [{ token: i0.Injector }, { token: i1$1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable });