@automerge/automerge-repo-react-hooks 1.1.11 → 1.1.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/dist/index.js CHANGED
@@ -5115,7 +5115,8 @@ const tD = (I) => {
5115
5115
  }, [C, E]), E;
5116
5116
  };
5117
5117
  function bD(I) {
5118
- return I ? oI().find(I) : void 0;
5118
+ const A = oI();
5119
+ return I ? A.find(I) : void 0;
5119
5120
  }
5120
5121
  var UI = aC, ZD = function(I) {
5121
5122
  return typeof I == "function";
@@ -1 +1 @@
1
- {"version":3,"file":"useHandle.d.ts","sourceRoot":"","sources":["../src/useHandle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAGpE;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAEzE"}
1
+ {"version":3,"file":"useHandle.d.ts","sourceRoot":"","sources":["../src/useHandle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAGpE;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAGzE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automerge/automerge-repo-react-hooks",
3
- "version": "1.1.11",
3
+ "version": "1.1.12",
4
4
  "description": "Hooks to access an Automerge Repo from your react app.",
5
5
  "repository": "https://github.com/automerge/automerge-repo/tree/master/packages/automerge-repo-react-hooks",
6
6
  "author": "Peter van Hardenberg <pvh@pvh.ca>",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@automerge/automerge": "^2.1.13",
18
- "@automerge/automerge-repo": "1.1.11",
18
+ "@automerge/automerge-repo": "1.1.12",
19
19
  "eventemitter3": "^5.0.1",
20
20
  "react": "^18.2.0",
21
21
  "react-dom": "^18.2.0",
@@ -42,5 +42,5 @@
42
42
  "publishConfig": {
43
43
  "access": "public"
44
44
  },
45
- "gitHead": "3144dec63b3074af22adcbaf36428c53b0081322"
45
+ "gitHead": "80be114993cb369fd305c68ca6dfd5a8ae892a30"
46
46
  }
package/src/useHandle.ts CHANGED
@@ -7,5 +7,6 @@ import { useRepo } from "./useRepo.js"
7
7
  * This requires a {@link RepoContext} to be provided by a parent component.
8
8
  */
9
9
  export function useHandle<T>(id?: AnyDocumentId): DocHandle<T> | undefined {
10
- return id ? useRepo().find(id) : undefined
10
+ const repo = useRepo()
11
+ return id ? repo.find(id) : undefined
11
12
  }