Skip to content

Commit

Permalink
Use name attribute not the deprecated getter function (#1804)
Browse files Browse the repository at this point in the history
https://electronjs.org/docs/all#appgetname is deprecated,
https://electronjs.org/docs/all#appname should be used instead. This PR
replaces uses of `.getName()` with `.name`.
belcherj authored Feb 11, 2020
1 parent 1632c11 commit 4795d1a
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion desktop/menus/mac-app-menu.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ const menuItems = require('./menu-items');
const build = require('../detect/build');

const macAppMenu = {
label: app.getName(),
label: app.name,
submenu: [
menuItems.about,
...(build.isMAS() ? [] : [menuItems.checkForUpdates]),
2 changes: 1 addition & 1 deletion desktop/menus/menu-items.js
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ const updater = require('../updater');
const DialogTypes = require('../../shared/dialog-types');

const about = {
label: '&About ' + app.getName(),
label: '&About ' + app.name,
click: appCommandSender({
action: 'showDialog',
dialog: DialogTypes.ABOUT,
2 changes: 1 addition & 1 deletion desktop/updater/lib/Updater.js
Original file line number Diff line number Diff line change
@@ -86,7 +86,7 @@ class Updater extends EventEmitter {

expandMacros(originalText) {
const macros = {
name: app.getName(),
name: app.name,
currentVersion: app.getVersion(),
newVersion: this._version,
};

0 comments on commit 4795d1a

Please sign in to comment.