I have recently switched from localStorage to chrome.storage.local. I was developing and testing extension on Chromium based browser and when I have finished with testing and everything worked I have uploaded it to multiple web stores, but as soon as I got to FireFox store I tested it before publishing and when I open browser extension it just output me an error in console saying that lang[readData(…)] is undefined.
I’m really not good with async stuffs, but it’s really strange that the same code works on chromium based browsers but doesn’t on FireFox.
Here is how I manage with data:
As you can see I have functions like: readData, writeData and deleteData.
The problem is in readData, does anyone know how should I fix this error on FireFox browser?
The same code is used for website, android application, desktop application… That’s why I have chrome.storage.local in try / catch statement and if it doesn’t exists it would use localStorage.
And here is the .zip file of the extension, that doesn’t work on FireFox browser: https://github.com/Rabbit-Company/Passky-Browser-Extension/releases/tag/v4.1.0
Thanks for any help in advance!