Skip to content

Commit

Permalink
[Fix] whichTypedArray can return false in both cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jan 5, 2023
1 parent 15aab59 commit df3e3c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,9 @@ function objEquiv(a, b, opts, channel) {
}
if (opts.strict && gPO && gPO(a) !== gPO(b)) { return false; }

if (whichTypedArray(a) !== whichTypedArray(b)) {
var aWhich = whichTypedArray(a);
var bWhich = whichTypedArray(b);
if ((aWhich || bWhich) && aWhich !== bWhich) {
return false;
}

Expand Down

0 comments on commit df3e3c4

Please sign in to comment.