Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Commit 4585c2f

Browse files
committed
Fixing check on valueOf type to get correct hash
According to valueOf type, a different hash code should be computed, but the second check on valueOf type is mistakenly done on obj instead
1 parent 6924b84 commit 4585c2f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/core/internal/dictionary.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
// Hack check for valueOf
6767
var valueOf = obj.valueOf();
6868
if (typeof valueOf === 'number') { return numberHashFn(valueOf); }
69-
if (typeof obj === 'string') { return stringHashFn(valueOf); }
69+
if (typeof valueOf === 'string') { return stringHashFn(valueOf); }
7070
}
7171
if (obj.hashCode) { return obj.hashCode(); }
7272

0 commit comments

Comments
 (0)