@next-core/brick-kit 2.136.0 → 2.136.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
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.136.1](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.136.0...@next-core/brick-kit@2.136.1) (2022-09-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * fix missing runtime brick in event callback ([a5b70be](https://github.com/easyops-cn/next-core/commit/a5b70be68bc6a856b78992320518d0a0e6a41128))
12
+
13
+
14
+
15
+
16
+
6
17
  # [2.136.0](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.135.1...@next-core/brick-kit@2.136.0) (2022-09-05)
7
18
 
8
19
 
@@ -2034,7 +2034,7 @@
2034
2034
  }
2035
2035
 
2036
2036
  if (callback) {
2037
- var callbackFactory = eventCallbackFactory(callback, () => this.getResolveOptions(_internalApiGetCurrentContext()).mergedContext);
2037
+ var callbackFactory = eventCallbackFactory(callback, () => this.getResolveOptions(_internalApiGetCurrentContext()).mergedContext, null);
2038
2038
  promise.then(val => {
2039
2039
  callbackFactory("success")({
2040
2040
  value: val
@@ -6692,7 +6692,7 @@
6692
6692
  };
6693
6693
  }
6694
6694
 
6695
- function eventCallbackFactory(callback, getContext) {
6695
+ function eventCallbackFactory(callback, getContext, runtimeBrick) {
6696
6696
  return function callbackFactory(type) {
6697
6697
  return function (result) {
6698
6698
  if (callback !== null && callback !== void 0 && callback[type]) {
@@ -6702,7 +6702,7 @@
6702
6702
  });
6703
6703
  var context = getContext();
6704
6704
  [].concat(callback[type]).forEach(eachHandler => {
6705
- listenerFactory(eachHandler, context, null)(event);
6705
+ listenerFactory(eachHandler, context, runtimeBrick)(event);
6706
6706
  });
6707
6707
  } catch (err) {
6708
6708
  // Do not throw errors in `callback.success` or `callback.progress`,
@@ -6756,7 +6756,7 @@
6756
6756
  return;
6757
6757
  }
6758
6758
 
6759
- var callbackFactory = eventCallbackFactory(handler.callback, () => context);
6759
+ var callbackFactory = eventCallbackFactory(handler.callback, () => context, runtimeBrick);
6760
6760
  var pollableCallback = {
6761
6761
  progress: callbackFactory("progress"),
6762
6762
  success: callbackFactory("success"),