#Localstorage does not return any object
27 messages · Page 1 of 1 (latest)
You’re sure you’re in the renderer process?
I am trying to access it in a folder that has all the IPC calls
I think that's the renderer process
@serene patio there ?
A repro would be good
localStorage doesnt work properly with file protocol
what is a file protocol ?
file://
Just checked now.Turns out I'm in a main process
then localStorage is undefined i guess
if (process.type === "browser") {
console.log("This is the main process");
} else if (process.type === "renderer") {
console.log("This is a renderer process");
}
Checked with this condition
you can check if localStorage exists
I am logging just localStorage it does not print anything on the console
console.log(typeof localStorage)
undefined
undefined
And they are ?
depends on amount of data
Can you name some ?
sqlite
cool.