@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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.71.0](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.70.4...@next-core/brick-kit@2.71.0) (2021-09-23)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * refine inject marking ([01675a8](https://github.com/easyops-cn/next-core/commit/01675a8b26fb0ab0e97de89a83c4618ccb4e7127))
12
+
13
+
14
+ ### Features
15
+
16
+ * **LocationContext:** handlePageLoad dispatch page.load event on window for e2e testing usage ([d9bb07b](https://github.com/easyops-cn/next-core/commit/d9bb07b0395fbf769d485768bbb64e035b72c743))
17
+
18
+
19
+
20
+
21
+
6
22
  ## [2.70.4](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.70.3...@next-core/brick-kit@2.70.4) (2021-09-23)
7
23
 
8
24
  **Note:** Version bump only for package @next-core/brick-kit
@@ -778,9 +778,13 @@
778
778
 
779
779
  if (Array.isArray(value)) {
780
780
  value.forEach(recursiveMarkAsInjected);
781
- } else if (value.constructor === Object) {
781
+ } else {
782
782
  // Only mark pure objects.
783
- Object.values(value).forEach(recursiveMarkAsInjected);
783
+ var proto = Object.getPrototypeOf(value);
784
+
785
+ if (!proto || proto.constructor === Object) {
786
+ Object.values(value).forEach(recursiveMarkAsInjected);
787
+ }
784
788
  }
785
789
  }
786
790
  }
@@ -7889,7 +7893,10 @@
7889
7893
  }
7890
7894
 
7891
7895
  handlePageLoad() {
7892
- this.dispatchLifeCycleEvent(new CustomEvent("page.load"), this.pageLoadHandlers);
7896
+ var event = new CustomEvent("page.load");
7897
+ this.dispatchLifeCycleEvent(event, this.pageLoadHandlers); // Currently only for e2e testing
7898
+
7899
+ window.dispatchEvent(event);
7893
7900
  }
7894
7901
 
7895
7902
  handleBeforePageLeave(detail) {