jmdobry / angular-cache

angular-cache is a very useful replacement for the Angular 1 $cacheFactory.
http://jmdobry.github.io/angular-cache
MIT License
1.39k stars 156 forks source link

stringifyNumber(0) fails to stringify #132

Closed pennersr closed 10 years ago

pennersr commented 10 years ago

I have to work my way with a legacy API that allows 0 as a valid id (don't ask). When wrapping this API with angular-data I bumped into:

http://errors.angularjs.org/1.2.25/ng/areq?p0=Expected%20key%20to%20be%20a%20string!%20Found%3A%20%7B0%7D.&p1=number

After applying this patch things started working.