Fixed exception when comparing arrays with Symbol keys

* Fixes #1966
This commit is contained in:
Steve Gravrock
2022-05-07 10:42:29 -07:00
parent 270344bd38
commit 9d80377fe3
3 changed files with 24 additions and 2 deletions

View File

@@ -546,7 +546,7 @@ getJasmineRequireObj().MatchersUtil = function(j$) {
var extraKeys = [];
for (var i = 0; i < allKeys.length; i++) {
if (!/^[0-9]+$/.test(allKeys[i])) {
if (typeof allKeys[i] === 'symbol' || !/^[0-9]+$/.test(allKeys[i])) {
extraKeys.push(allKeys[i]);
}
}