Move click variable near this.click

This commit is contained in:
Kevin Sawicki 2016-06-21 16:07:20 -07:00
parent 38e1abc599
commit 4e8d4dfda9

View file

@ -34,7 +34,6 @@ const methodInApp = {
const MenuItem = function (options) {
const {app, Menu} = require('electron')
const click = options.click
this.selector = options.selector
this.type = options.type
this.role = options.role
@ -75,6 +74,7 @@ const MenuItem = function (options) {
this.commandId = ++nextCommandId
const click = options.click
this.click = (focusedWindow) => {
// Manually flip the checked flags when clicked.
if (this.type === 'checkbox' || this.type === 'radio') {