@react-remote-state/client 1.1.1 → 1.1.2

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.mjs CHANGED
@@ -5579,9 +5579,9 @@ function useRemoteReducer(uri, reducer, gameId) {
5579
5579
  meta.client.on("error", console.error);
5580
5580
  meta.client.on("connect", () => {
5581
5581
  var _a, _b, _c;
5582
- if (gameId == void 0) {
5582
+ if (gameId == void 0 && !game) {
5583
5583
  (_a = meta.client) == null ? void 0 : _a.emit("create");
5584
- } else {
5584
+ } else if (!!gameId) {
5585
5585
  let playerCache = (0, import_lodash.flow)(
5586
5586
  () => !!gameId ? sessionStorage.getItem(gameId) : null,
5587
5587
  (cache) => !!cache ? JSON.parse(cache) : null