Skip to content

Commit

Permalink
Stable Version 4.2.2.
Browse files Browse the repository at this point in the history
Fixes #165
  • Loading branch information
jmdobry committed Jul 1, 2015
1 parent a286c76 commit 9ba0574
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
##### 4.2.2 1 July 2015

###### Backwards compatible bug fixes
- #165 - storageMode does not inherits from defaults

##### 4.2.1 1 July 2015

Upgraded dependencies
Better CommonJS interop
Added a number of build examples

##### 4.2.0 27 April 2015

###### Backwards compatible bug fixes
Expand Down
4 changes: 2 additions & 2 deletions dist/angular-cache.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* angular-cache
* @version 4.2.1 - Homepage <http://jmdobry.github.io/angular-cache/>
* @version 4.2.2 - Homepage <http://jmdobry.github.io/angular-cache/>
* @author Jason Dobry <[email protected]>
* @copyright (c) 2013-2015 Jason Dobry
* @license MIT <https://github.com/jmdobry/angular-cache/blob/master/LICENSE>
Expand Down Expand Up @@ -829,7 +829,7 @@ return /******/ (function(modules) { // webpackBootstrap
}

if ('storageMode' in cacheOptions || 'storageImpl' in cacheOptions) {
this.setStorageMode(cacheOptions.storageMode, cacheOptions.storageImpl);
this.setStorageMode(cacheOptions.storageMode || defaults.storageMode, cacheOptions.storageImpl || defaults.storageImpl);
} else if (strict) {
this.setStorageMode(defaults.storageMode, defaults.storageImpl);
}
Expand Down
4 changes: 2 additions & 2 deletions dist/angular-cache.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/angular-cache.min.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angular-cache",
"description": "angular-cache is a very useful replacement for Angular's $cacheFactory.",
"version": "4.2.1",
"version": "4.2.2",
"homepage": "http://jmdobry.github.io/angular-cache/",
"main": "dist/angular-cache.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ class CacheFactoryProvider {
}

if ('storageMode' in cacheOptions || 'storageImpl' in cacheOptions) {
this.setStorageMode(cacheOptions.storageMode, cacheOptions.storageImpl);
this.setStorageMode(cacheOptions.storageMode || defaults.storageMode, cacheOptions.storageImpl || defaults.storageImpl);
} else if (strict) {
this.setStorageMode(defaults.storageMode, defaults.storageImpl);
}
Expand Down
3 changes: 3 additions & 0 deletions test/unit/DSCacheFactory/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ describe('CacheFactory(cacheId, options)', function () {
}
assert.equal(msg, 'storageMode must be "memory", "localStorage" or "sessionStorage"!');
for (var i = 0; i < TYPES_EXCEPT_STRING.length; i++) {
if (!TYPES_EXCEPT_STRING[i]) {
continue;
}
try {
TestCacheFactory('storageModeCache' + i, { storageMode: TYPES_EXCEPT_STRING[i] });
fail(TYPES_EXCEPT_STRING[i]);
Expand Down

0 comments on commit 9ba0574

Please sign in to comment.