{{ message }}
Repository navigation
Commit e6832b2
assert: fix TypeError on deepStrictEqual with null Map key or Set member
deepStrictEqual() and util.isDeepStrictEqual() threw "Cannot read
properties of null (reading 'constructor')" instead of comparing when
a Map key or Set member was null/undefined (or another primitive) and
lined up against object-only keys/members in the other collection with
an equal count. The primitive/null handling was gated behind an
optimization that is skipped when the counts match, letting such keys
reach objectComparisonStart, which dereferences `.constructor`.
Resolve primitive and null keys/members directly in every case.
Signed-off-by: semx <7532921+semx@users.noreply.github.com>
PR-URL: #64449
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent eff5d15 commit e6832b2
2 files changed
Lines changed: 24 additions & 7 deletions

0 commit comments