From 4585c2f9e260482f577640d63d692c4eb9fa85d2 Mon Sep 17 00:00:00 2001 From: Roberto Vespa Date: Tue, 20 Jan 2015 09:00:34 +0100 Subject: [PATCH] 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 --- src/core/internal/dictionary.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/internal/dictionary.js b/src/core/internal/dictionary.js index efa1a0009..3f6a15e99 100644 --- a/src/core/internal/dictionary.js +++ b/src/core/internal/dictionary.js @@ -66,7 +66,7 @@ // Hack check for valueOf var valueOf = obj.valueOf(); if (typeof valueOf === 'number') { return numberHashFn(valueOf); } - if (typeof obj === 'string') { return stringHashFn(valueOf); } + if (typeof valueOf === 'string') { return stringHashFn(valueOf); } } if (obj.hashCode) { return obj.hashCode(); }