We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f9fd2f commit 0e2ac3cCopy full SHA for 0e2ac3c
1 file changed
src/ng/cacheFactory.js
@@ -159,13 +159,13 @@ function $CacheFactoryProvider() {
159
* @returns {*} the value stored.
160
*/
161
put: function(key, value) {
162
+ if (isUndefined(value)) return;
163
if (capacity < Number.MAX_VALUE) {
164
var lruEntry = lruHash[key] || (lruHash[key] = {key: key});
165
166
refresh(lruEntry);
167
}
168
- if (isUndefined(value)) return;
169
if (!(key in data)) size++;
170
data[key] = value;
171
0 commit comments