@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.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