Skip to content

Commit

Permalink
Silence deprecation warning in Electron 7 (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphinesse authored and sindresorhus committed Nov 8, 2019
1 parent 31cafe1 commit dbf1c57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const isDev = require('electron-is-dev');
const app = electron.app || electron.remote.app;
const dialog = electron.dialog || electron.remote.dialog;
const clipboard = electron.clipboard || electron.remote.clipboard;
const appName = app.getName();
const appName = 'name' in app ? app.name : app.getName();

// The dialog.showMessageBox method has been split into a sync and an async variant in Electron 6.0.0
const showMessageBox = dialog.showMessageBoxSync || dialog.showMessageBox;
Expand Down

0 comments on commit dbf1c57

Please sign in to comment.