Content-Length: 211194 | pFad | https://redirect.github.com/vitest-dev/vitest/commit/ce368457

6B fix: check for null before storing in weakmap · vitest-dev/vitest@ce36845 · GitHub
Skip to content

Commit

Permalink
fix: check for null before storing in weakmap
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Apr 24, 2024
1 parent 1be4510 commit ce36845
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/expect/src/jest-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ export function subsetEquality(object: unknown, subset: unknown, customTesters:
return undefined

return Object.keys(subset).every((key) => {
if (typeof subset[key] === 'object') {
if (subset[key] != null && typeof subset[key] === 'object') {
if (seenReferences.has(subset[key]))
return equals(object[key], subset[key], filteredCustomTesters)

Expand Down

0 comments on commit ce36845

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://redirect.github.com/vitest-dev/vitest/commit/ce368457

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy