File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -186,9 +186,9 @@ function cacheModule(config){
186186 storageKey = 'cache-module-storage-mock' ;
187187 }
188188 else {
189- var storageType = ( config . storage === 'local' ) ? 'local' : 'session' ;
190- store = ( typeof Storage !== void ( 0 ) ) ? window [ storageType + 'Storage' ] : false ;
191- storageKey = 'cache-module-' + storageType + '-storage' ;
189+ var storageType = ( config . storage === 'local' || config . storage === 'session' ) ? config . storage : null ;
190+ store = ( storageType && typeof Storage !== void ( 0 ) ) ? window [ storageType + 'Storage' ] : false ;
191+ storageKey = ( storageType ) ? 'cache-module-' + storageType + '-storage' : null ;
192192 }
193193 if ( store ) {
194194 var db = store . getItem ( storageKey ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " cache-service-cache-module" ,
3- "version" : " 1.2.1 " ,
3+ "version" : " 1.2.2 " ,
44 "description" : " A cache plugin for cache-service." ,
55 "main" : " cacheModule.js" ,
66 "devDependencies" : {
You can’t perform that action at this time.
0 commit comments