@sprucelabs/spruce-calendar-components 22.3.4 → 22.3.5

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.
@@ -129,12 +129,15 @@ export default class AbstractCalendarEventToolBeltState {
129
129
  return false;
130
130
  }
131
131
  this.pendingContextUpdates = pendingUpdates;
132
- yield this.handleDidUpdateContext(fromToolId);
133
132
  const vc = this.getVcForTool(fromToolId);
134
- if ((vc === null || vc === void 0 ? void 0 : vc.shouldPersistContextChangesImmediately) ||
135
- (options === null || options === void 0 ? void 0 : options.shouldPersistContextChangesImmediately)) {
133
+ const shouldPersistChanges = (vc === null || vc === void 0 ? void 0 : vc.shouldPersistContextChangesImmediately) ||
134
+ (options === null || options === void 0 ? void 0 : options.shouldPersistContextChangesImmediately);
135
+ if (shouldPersistChanges) {
136
136
  return this.sm.updateContext(Object.assign({}, updates));
137
137
  }
138
+ else {
139
+ yield this.handleDidUpdateContext(fromToolId);
140
+ }
138
141
  return false;
139
142
  });
140
143
  }
@@ -108,12 +108,15 @@ class AbstractCalendarEventToolBeltState {
108
108
  return false;
109
109
  }
110
110
  this.pendingContextUpdates = pendingUpdates;
111
- await this.handleDidUpdateContext(fromToolId);
112
111
  const vc = this.getVcForTool(fromToolId);
113
- if ((vc === null || vc === void 0 ? void 0 : vc.shouldPersistContextChangesImmediately) ||
114
- (options === null || options === void 0 ? void 0 : options.shouldPersistContextChangesImmediately)) {
112
+ const shouldPersistChanges = (vc === null || vc === void 0 ? void 0 : vc.shouldPersistContextChangesImmediately) ||
113
+ (options === null || options === void 0 ? void 0 : options.shouldPersistContextChangesImmediately);
114
+ if (shouldPersistChanges) {
115
115
  return this.sm.updateContext(Object.assign({}, updates));
116
116
  }
117
+ else {
118
+ await this.handleDidUpdateContext(fromToolId);
119
+ }
117
120
  return false;
118
121
  }
119
122
  removeTool(id) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sprucelabs/spruce-calendar-components",
3
3
  "description": "Calendar components for working with calendars and Sprucebot.",
4
- "version": "22.3.4",
4
+ "version": "22.3.5",
5
5
  "skill": {
6
6
  "namespace": "calendar"
7
7
  },