Skip to content

Commit 9ba0574

Browse files
committed
Stable Version 4.2.2.
Fixes #165
1 parent a286c76 commit 9ba0574

File tree

7 files changed

+21
-7
lines changed

7 files changed

+21
-7
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
##### 4.2.2 1 July 2015
2+
3+
###### Backwards compatible bug fixes
4+
- #165 - storageMode does not inherits from defaults
5+
6+
##### 4.2.1 1 July 2015
7+
8+
Upgraded dependencies
9+
Better CommonJS interop
10+
Added a number of build examples
11+
112
##### 4.2.0 27 April 2015
213

314
###### Backwards compatible bug fixes

dist/angular-cache.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* angular-cache
3-
* @version 4.2.1 - Homepage <http://jmdobry.github.io/angular-cache/>
3+
* @version 4.2.2 - Homepage <http://jmdobry.github.io/angular-cache/>
44
* @author Jason Dobry <[email protected]>
55
* @copyright (c) 2013-2015 Jason Dobry
66
* @license MIT <https://github.com/jmdobry/angular-cache/blob/master/LICENSE>
@@ -829,7 +829,7 @@ return /******/ (function(modules) { // webpackBootstrap
829829
}
830830

831831
if ('storageMode' in cacheOptions || 'storageImpl' in cacheOptions) {
832-
this.setStorageMode(cacheOptions.storageMode, cacheOptions.storageImpl);
832+
this.setStorageMode(cacheOptions.storageMode || defaults.storageMode, cacheOptions.storageImpl || defaults.storageImpl);
833833
} else if (strict) {
834834
this.setStorageMode(defaults.storageMode, defaults.storageImpl);
835835
}

dist/angular-cache.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-cache.min.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-cache",
33
"description": "angular-cache is a very useful replacement for Angular's $cacheFactory.",
4-
"version": "4.2.1",
4+
"version": "4.2.2",
55
"homepage": "http://jmdobry.github.io/angular-cache/",
66
"main": "dist/angular-cache.js",
77
"repository": {

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ class CacheFactoryProvider {
729729
}
730730

731731
if ('storageMode' in cacheOptions || 'storageImpl' in cacheOptions) {
732-
this.setStorageMode(cacheOptions.storageMode, cacheOptions.storageImpl);
732+
this.setStorageMode(cacheOptions.storageMode || defaults.storageMode, cacheOptions.storageImpl || defaults.storageImpl);
733733
} else if (strict) {
734734
this.setStorageMode(defaults.storageMode, defaults.storageImpl);
735735
}

test/unit/DSCacheFactory/index.test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ describe('CacheFactory(cacheId, options)', function () {
260260
}
261261
assert.equal(msg, 'storageMode must be "memory", "localStorage" or "sessionStorage"!');
262262
for (var i = 0; i < TYPES_EXCEPT_STRING.length; i++) {
263+
if (!TYPES_EXCEPT_STRING[i]) {
264+
continue;
265+
}
263266
try {
264267
TestCacheFactory('storageModeCache' + i, { storageMode: TYPES_EXCEPT_STRING[i] });
265268
fail(TYPES_EXCEPT_STRING[i]);

0 commit comments

Comments
 (0)