Move click variable near this.click
This commit is contained in:
parent
38e1abc599
commit
4e8d4dfda9
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,6 @@ const methodInApp = {
|
||||||
const MenuItem = function (options) {
|
const MenuItem = function (options) {
|
||||||
const {app, Menu} = require('electron')
|
const {app, Menu} = require('electron')
|
||||||
|
|
||||||
const click = options.click
|
|
||||||
this.selector = options.selector
|
this.selector = options.selector
|
||||||
this.type = options.type
|
this.type = options.type
|
||||||
this.role = options.role
|
this.role = options.role
|
||||||
|
@ -75,6 +74,7 @@ const MenuItem = function (options) {
|
||||||
|
|
||||||
this.commandId = ++nextCommandId
|
this.commandId = ++nextCommandId
|
||||||
|
|
||||||
|
const click = options.click
|
||||||
this.click = (focusedWindow) => {
|
this.click = (focusedWindow) => {
|
||||||
// Manually flip the checked flags when clicked.
|
// Manually flip the checked flags when clicked.
|
||||||
if (this.type === 'checkbox' || this.type === 'radio') {
|
if (this.type === 'checkbox' || this.type === 'radio') {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue