diff options
| author | Lucas Galfasó | 2013-05-07 09:14:57 -0300 |
|---|---|---|
| committer | Pete Bacon Darwin | 2013-05-10 20:04:59 +0100 |
| commit | 42ce8f7f556808da3947aa0bb1c448bbe970bd36 (patch) | |
| tree | 3e4ebe64268514554ddb53280b9024ea955d6b41 /src | |
| parent | 661390aef361c728ea68a699d60de5807d2fb5a8 (diff) | |
| download | angular.js-42ce8f7f556808da3947aa0bb1c448bbe970bd36.tar.bz2 | |
fix(ngPluralize): handle the empty string as a valid override
Fix the check for overrides so it is able to handle the empty string
Closes #2575
Diffstat (limited to 'src')
| -rw-r--r-- | src/ng/directive/ngPluralize.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ng/directive/ngPluralize.js b/src/ng/directive/ngPluralize.js index 3938d4e3..5d9ba73f 100644 --- a/src/ng/directive/ngPluralize.js +++ b/src/ng/directive/ngPluralize.js @@ -194,7 +194,7 @@ var ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interp if (!isNaN(value)) { //if explicit number rule such as 1, 2, 3... is defined, just use it. Otherwise, //check it against pluralization rules in $locale service - if (!whens[value]) value = $locale.pluralCat(value - offset); + if (!(value in whens)) value = $locale.pluralCat(value - offset); return whensExpFns[value](scope, element, true); } else { return ''; |
