Skip to content

Commit

Permalink
Require Electron 4
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Dec 31, 2018
1 parent abffec0 commit ca19e10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ class ElectronStore extends Conf {
constructor(options) {
const defaultCwd = (electron.app || electron.remote.app).getPath('userData');

opts = Object.assign({name: 'config'}, opts);
options = {
name: 'config',
...options
};

if (options.cwd) {
options.cwd = path.isAbsolute(options.cwd) ? options.cwd : path.join(defaultCwd, options.cwd);
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ You can use this module directly in both the main and renderer process.
$ npm install electron-store
```

*Requires Electron 2.0.0 or later.*
*Requires Electron 4 or later.*

<a href="https://www.patreon.com/sindresorhus">
<img src="https://c5.patreon.com/external/logo/[email protected]" width="160">
Expand Down

0 comments on commit ca19e10

Please sign in to comment.