Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit e53a05c

Browse files
committed
fixed cacheDriver defaults problem
1 parent 4b85bb5 commit e53a05c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/modules/initCacheStorage.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ export function initCacheStorage(key, localised = true) {
88
const storeView = currentStoreView()
99
const dbNamePrefix = storeView.storeCode ? storeView.storeCode + '-' : ''
1010
const config = rootStore.state.config
11-
const cacheDriver = config.localForage && config.localForage.defaultDrivers['orders'] || 'LOCALSTORAGE'
11+
const cacheDriver = config.localForage && config.localForage.defaultDrivers['orders'] ?
12+
config.localForage.defaultDrivers['orders'] :
13+
'LOCALSTORAGE'
1214

1315
if (localised) {
1416
const cacheStorage = new UniversalStorage(localForage.createInstance({

0 commit comments

Comments
 (0)