Skip to content

Commit

Permalink
fix: handle undefined hash in socket message handler (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
MIGUELez11 authored Dec 10, 2024
1 parent 48c3370 commit e583efc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client-src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,13 @@ var onSocketMessage = {
sendMessage("Invalid");
},
/**
* @param {string} hash
* @param {string | undefined} _hash
*/
hash: function hash(_hash) {
if (!_hash) {
return;
}

status.previousHash = status.currentHash;
status.currentHash = _hash;
},
Expand Down

0 comments on commit e583efc

Please sign in to comment.