diff options
| author | Lucas Galfasó | 2013-05-04 21:44:14 -0300 |
|---|---|---|
| committer | Pete Bacon Darwin | 2013-07-03 22:51:31 +0100 |
| commit | b3d7a038d774d823ef861b76fb8bfa22e60a3df5 (patch) | |
| tree | 87b10327d7ddb16ce636d04c81fafddb5b23219a /i18n/src/closureI18nExtractor.js | |
| parent | ef5bc6c7c3336a64bae64fe9739cb1789907c906 (diff) | |
| download | angular.js-b3d7a038d774d823ef861b76fb8bfa22e60a3df5.tar.bz2 | |
fix(i18n): Do not transform arrays into objects
Do not trasnform arrays into objects when generating the locale objects
Add unit test for this check
Diffstat (limited to 'i18n/src/closureI18nExtractor.js')
| -rw-r--r-- | i18n/src/closureI18nExtractor.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/i18n/src/closureI18nExtractor.js b/i18n/src/closureI18nExtractor.js index 13d42143..05e3997d 100644 --- a/i18n/src/closureI18nExtractor.js +++ b/i18n/src/closureI18nExtractor.js @@ -116,7 +116,7 @@ function canonicalizeForJsonStringify(unused_key, object) { // 2. https://code.google.com/p/v8/issues/detail?id=164 // ECMA-262 does not specify enumeration order. The de facto standard // is to match insertion order, which V8 also does ... - if (typeof object != "object") { + if (typeof object != "object" || Object.prototype.toString.apply(object) === '[object Array]') { return object; } var result = {}; |
