Skip to content

Cannot read property 'transaction' of undefined #101

Open
@RyanP13

Description

@RyanP13

I am getting this issue in my angular application.

The local forage provider is configured in the config block like so:

            $localForageProvider.config({
                driver: localforage.LOCALSTORAGE,
                name: 'ttn',
                storeName: 'keyvaluepairs'
            });

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions