@wooksjs/event-core 0.4.36 → 0.4.37

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.cjs CHANGED
@@ -134,8 +134,10 @@ function _getCtxHelpers(cc) {
134
134
  restoreCtx: () => (currentContext = cc),
135
135
  clearCtx,
136
136
  endEvent: (abortReason) => {
137
- eventContextHooks.fireEndEvent(cc.event.type, abortReason);
138
- clearCtx();
137
+ if (cc) {
138
+ eventContextHooks.fireEndEvent(cc.event.type, abortReason);
139
+ clearCtx();
140
+ }
139
141
  },
140
142
  store,
141
143
  getStore: get,
package/dist/index.mjs CHANGED
@@ -132,8 +132,10 @@ function _getCtxHelpers(cc) {
132
132
  restoreCtx: () => (currentContext = cc),
133
133
  clearCtx,
134
134
  endEvent: (abortReason) => {
135
- eventContextHooks.fireEndEvent(cc.event.type, abortReason);
136
- clearCtx();
135
+ if (cc) {
136
+ eventContextHooks.fireEndEvent(cc.event.type, abortReason);
137
+ clearCtx();
138
+ }
137
139
  },
138
140
  store,
139
141
  getStore: get,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wooksjs/event-core",
3
- "version": "0.4.36",
3
+ "version": "0.4.37",
4
4
  "description": "@wooksjs/event-core",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",