Skip to content

Commit

Permalink
Merge pull request #155 from bibhuty-did-this/next
Browse files Browse the repository at this point in the history
fix: weak key mapping due to empty object
  • Loading branch information
aravindet authored Mar 22, 2024
2 parents 5b4334f + 3609f95 commit 6196a7a
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.type === 'object' && payload) decodeCache.set(payload, decoded);
return decoded;
};
}
Expand Down

0 comments on commit 6196a7a

Please sign in to comment.