@next-core/brick-kit 2.70.4 → 2.71.0

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.
package/dist/index.esm.js CHANGED
@@ -759,9 +759,13 @@ function recursiveMarkAsInjected(value) {
759
759
 
760
760
  if (Array.isArray(value)) {
761
761
  value.forEach(recursiveMarkAsInjected);
762
- } else if (value.constructor === Object) {
762
+ } else {
763
763
  // Only mark pure objects.
764
- Object.values(value).forEach(recursiveMarkAsInjected);
764
+ var proto = Object.getPrototypeOf(value);
765
+
766
+ if (!proto || proto.constructor === Object) {
767
+ Object.values(value).forEach(recursiveMarkAsInjected);
768
+ }
765
769
  }
766
770
  }
767
771
  }
@@ -7870,7 +7874,10 @@ class LocationContext {
7870
7874
  }
7871
7875
 
7872
7876
  handlePageLoad() {
7873
- this.dispatchLifeCycleEvent(new CustomEvent("page.load"), this.pageLoadHandlers);
7877
+ var event = new CustomEvent("page.load");
7878
+ this.dispatchLifeCycleEvent(event, this.pageLoadHandlers); // Currently only for e2e testing
7879
+
7880
+ window.dispatchEvent(event);
7874
7881
  }
7875
7882
 
7876
7883
  handleBeforePageLeave(detail) {