@dabble/patches 0.5.9 → 0.5.10

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.
@@ -4,8 +4,8 @@ import { getSnapshotAtRevision } from "./getSnapshotAtRevision.js";
4
4
  async function getStateAtRevision(store, docId, rev) {
5
5
  const { state: versionState, rev: snapshotRev, changes } = await getSnapshotAtRevision(store, docId, rev);
6
6
  return {
7
- // Ensure null is passed if versionState or versionState.state is null/undefined
8
- state: applyChanges(versionState?.state ?? null, changes),
7
+ // Ensure null is passed if versionState is null/undefined
8
+ state: applyChanges(versionState ?? null, changes),
9
9
  rev: changes.at(-1)?.rev ?? snapshotRev
10
10
  };
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dabble/patches",
3
- "version": "0.5.9",
3
+ "version": "0.5.10",
4
4
  "description": "Immutable JSON Patch implementation based on RFC 6902 supporting operational transformation and last-writer-wins",
5
5
  "author": "Jacob Wright <jacwright@gmail.com>",
6
6
  "bugs": {