| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent cac300e commit 76fd0ea
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -502,8 +502,9 @@ function setEquiv(a, b, strict, memo) { | |||
| 502 | 502 | for (const val of b) { | |
| 503 | 503 | // Primitive values have already been handled above. | |
| 504 | 504 | if (typeof val === 'object' && val !== null) { | |
| 505 | - if (!setHasEqualElement(set, val, strict, memo)) | ||
| 505 | + if (!a.has(val) && !setHasEqualElement(set, val, strict, memo)) { | ||
| 506 | 506 | return false; | |
| 507 | + } | ||
| 507 | 508 | } else if (!strict && | |
| 508 | 509 | !a.has(val) && | |
| 509 | 510 | !setHasEqualElement(set, val, strict, memo)) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -375,7 +375,11 @@ assertOnlyDeepEqual( | |||
| 375 | 375 | new Map([[undefined, null], ['+000', 2n]]), | |
| 376 | 376 | new Map([[null, undefined], [false, '2']]), | |
| 377 | 377 | ); | |
| 378 | - | ||
| 378 | + const xarray = ['x']; | ||
| 379 | + assertDeepAndStrictEqual( | ||
| 380 | + new Set([xarray, ['y']]), | ||
| 381 | + new Set([xarray, ['y']]) | ||
| 382 | + ); | ||
| 379 | 383 | assertOnlyDeepEqual( | |
| 380 | 384 | new Set([null, '', 1n, 5, 2n, false]), | |
| 381 | 385 | new Set([undefined, 0, 5n, true, '2', '-000']) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments