Skip to content

Commit

Permalink
fix: nullish or false data value would not trigger storage_update
Browse files Browse the repository at this point in the history
  • Loading branch information
therealPaulPlay committed Jan 28, 2025
1 parent ad7c2f4 commit b1d581e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b1d581e

Please sign in to comment.