event-store-adapter-js 2.1.6-snapshot.2 → 2.1.6
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.
|
@@ -131,7 +131,7 @@ class EventStoreForDynamoDB {
|
|
|
131
131
|
yield this.createEventAndSnapshot(event, aggregate);
|
|
132
132
|
}
|
|
133
133
|
else {
|
|
134
|
-
yield this.updateEventAndSnapshotOpt(event, aggregate.
|
|
134
|
+
yield this.updateEventAndSnapshotOpt(event, aggregate.version, aggregate);
|
|
135
135
|
yield this.tryPurgeExcessSnapshots(event);
|
|
136
136
|
}
|
|
137
137
|
(_b = this.logger) === null || _b === void 0 ? void 0 : _b.debug(`persistEventAndSnapshot(${JSON.stringify(event)}, ${JSON.stringify(aggregate)}): finished`);
|
package/package.json
CHANGED
|
@@ -180,11 +180,7 @@ class EventStoreForDynamoDB<
|
|
|
180
180
|
if (event.isCreated) {
|
|
181
181
|
await this.createEventAndSnapshot(event, aggregate);
|
|
182
182
|
} else {
|
|
183
|
-
await this.updateEventAndSnapshotOpt(
|
|
184
|
-
event,
|
|
185
|
-
aggregate.sequenceNumber,
|
|
186
|
-
aggregate,
|
|
187
|
-
);
|
|
183
|
+
await this.updateEventAndSnapshotOpt(event, aggregate.version, aggregate);
|
|
188
184
|
await this.tryPurgeExcessSnapshots(event);
|
|
189
185
|
}
|
|
190
186
|
this.logger?.debug(
|