@interncom/diplomatic 0.0.24 → 0.0.25

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.
Files changed (2) hide show
  1. package/dist/index.mjs +5 -2
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -29,8 +29,11 @@ function useClientState(client) {
29
29
  }
30
30
  function useSyncOnResume(client) {
31
31
  useEffect(() => {
32
- function handleOnline() {
33
- client.sync();
32
+ async function handleOnline() {
33
+ if (client.hostURL) {
34
+ await client.connect(client.hostURL);
35
+ }
36
+ await client.sync();
34
37
  }
35
38
  window.addEventListener("online", handleOnline);
36
39
  return () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interncom/diplomatic",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "type": "module",
5
5
  "description": "Secure sync layer",
6
6
  "main": "dist/index.mjs",