electron-userland / electron-json-storage

:package: Easily write and read user settings in Electron apps
1.43k stars 79 forks source link

Graceful fallback if the renderer process can't access the remote module #159

Closed jviotti closed 3 years ago

jviotti commented 3 years ago

Right now this module will crash when being ran on a renderer process that cannot access the remote module for determining a default data path. After this commit, the module will gracefully require users to call .setDataPath() if remote.app cannot be accessed.

See: https://github.com/electron-userland/electron-json-storage/issues/155 Signed-off-by: Juan Cruz Viotti jv@jviotti.com

jviotti commented 3 years ago

This seems to make the module work when setting enableRemoteModule: false