@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.js CHANGED
@@ -5592,9 +5592,9 @@ function useRemoteReducer(uri, reducer, gameId) {
5592
5592
  meta.client.on("error", console.error);
5593
5593
  meta.client.on("connect", () => {
5594
5594
  var _a, _b, _c;
5595
- if (gameId == void 0) {
5595
+ if (gameId == void 0 && !game) {
5596
5596
  (_a = meta.client) == null ? void 0 : _a.emit("create");
5597
- } else {
5597
+ } else if (!!gameId) {
5598
5598
  let playerCache = (0, import_lodash.flow)(
5599
5599
  () => !!gameId ? sessionStorage.getItem(gameId) : null,
5600
5600
  (cache) => !!cache ? JSON.parse(cache) : null