Skip to content

Commit

Permalink
fix: weak key mapping due to empty object
Browse files Browse the repository at this point in the history
  • Loading branch information
bibhuty-did-this committed Mar 21, 2024
1 parent 5b4334f commit 42e2ad2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/shift.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function memoizeDecode(origDecode) {
return (payload) => {
if (decodeCache.has(payload)) return decodeCache.get(payload);
const decoded = origDecode(payload);
decodeCache.set(payload, decoded);
if(!!payload) decodeCache.set(payload, decoded);
return decoded;
};
}
Expand Down

0 comments on commit 42e2ad2

Please sign in to comment.