You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once a user is logged in there is a browser refresh timer which triggers on an hourly basis.
When that happens the config block will run again and throw the following error in the localforage JS file because once logged in we try to resolve the logged in user on that route. It seems from localforage JS that in line 1186:
var store = dbInfo.db.transaction(dbInfo.storeName, 'readonly')
The db is not yet defined. When i check that the data is there in local storage from the window object it is definitely stored there.
Is this expected behaviour?
The text was updated successfully, but these errors were encountered:
For what it is worth i solved this in a hacky way by checking the window.localStorage object to see if my storage key was present. If not found then define the store. Not pretty:
function configureLocalForage(){
var isStoreDefined = false;
for (var key in window.localStorage){
if(key.match(/^ttn\/[a-z0-9]*/gmi) !== null){
isStoreDefined = true;
}
}
if(!isStoreDefined){
$localForageProvider.config({
driver: localforage.LOCALSTORAGE,
name: 'ttn',
storeName: 'keyvaluepairs'
});
}
}
I am getting this issue in my angular application.
The local forage provider is configured in the config block like so:
Once a user is logged in there is a browser refresh timer which triggers on an hourly basis.
When that happens the config block will run again and throw the following error in the localforage JS file because once logged in we try to resolve the logged in user on that route. It seems from localforage JS that in line 1186:
var store = dbInfo.db.transaction(dbInfo.storeName, 'readonly')
The db is not yet defined. When i check that the data is there in local storage from the window object it is definitely stored there.
Is this expected behaviour?
The text was updated successfully, but these errors were encountered: