aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLucas Galfasó2013-05-07 09:14:57 -0300
committerPete Bacon Darwin2013-05-10 20:03:24 +0100
commit67a4a25b890fada0043c1ff98e5437d793f44d0c (patch)
treeb9b494506edb955c7c3f6b3406ece36da636f912 /src
parentf6caab598f91eaeb0f06395620e38816154faa70 (diff)
downloadangular.js-67a4a25b890fada0043c1ff98e5437d793f44d0c.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.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ng/directive/ngPluralize.js b/src/ng/directive/ngPluralize.js
index a02035ea..2aeb9703 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 '';