aberdeen 1.0.11 → 1.0.12

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/src/prediction.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import { defaultEmitHandler, withEmitHandler } from "./aberdeen.js";
2
- import type { DatumType, TargetType } from "./aberdeen.js";
2
+ import type { TargetType } from "./aberdeen.js";
3
3
 
4
4
  /**
5
5
  * Represents a set of changes that can be applied to proxied objects.
6
6
  * This is an opaque type - its internal structure is not part of the public API.
7
7
  * @private
8
8
  */
9
- export type Patch = Map<TargetType, Map<any, [DatumType, DatumType]>>;
9
+ export type Patch = Map<TargetType, Map<any, [any, any]>>;
10
10
 
11
11
  function recordPatch(func: () => void): Patch {
12
12
  const recordingPatch = new Map();
@@ -20,8 +20,8 @@ function addToPatch(
20
20
  patch: Patch,
21
21
  collection: TargetType,
22
22
  index: any,
23
- newData: DatumType,
24
- oldData: DatumType,
23
+ newData: any,
24
+ oldData: any,
25
25
  ) {
26
26
  let collectionMap = patch.get(collection);
27
27
  if (!collectionMap) {
package/src/route.ts CHANGED
@@ -153,7 +153,7 @@ immediateObserve(() => {
153
153
  function isSamePage(path: string, state: any): boolean {
154
154
  return (
155
155
  location.pathname === path &&
156
- JSON.stringify(history.state.id) === JSON.stringify(state.id)
156
+ JSON.stringify(history.state.id || {}) === JSON.stringify(state.id || {})
157
157
  );
158
158
  }
159
159