From b1d581e33738a7622971b35adb3a5fc30624561f Mon Sep 17 00:00:00 2001 From: PaulPlay <80539587+therealPaulPlay@users.noreply.github.com> Date: Tue, 28 Jan 2025 19:49:24 +0100 Subject: [PATCH] fix: nullish or false data value would not trigger storage_update --- package.json | 2 +- src/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e064240..80d1e19 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "playpeerjs", - "version": "1.1.6", + "version": "1.1.7", "description": "WebRTC-based wrapper for creating robust peer-2-peer multiplayer systems with ease.", "type": "module", "main": "dist/playpeer.js", diff --git a/src/index.js b/src/index.js index 1219437..e595ff2 100644 --- a/src/index.js +++ b/src/index.js @@ -209,7 +209,7 @@ export default class PlayPeer { switch (data.type) { case 'storage_update': // Storage updates, sent out by clients - if (this.#isHost && data.value && data.key) { + if (this.#isHost && data.key) { this.updateStorage(data.key, data.value); } break;