@react-remote-state/client 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
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