Use spread syntax instead of function apply
This commit is contained in:
parent
f72942bff1
commit
c8ff67ab75
12 changed files with 30 additions and 34 deletions
|
@ -50,7 +50,7 @@ module.exports = {
|
|||
showOpenDialog: function (...args) {
|
||||
var prop, properties, value, wrappedCallback
|
||||
checkAppInitialized()
|
||||
let [window, options, callback] = parseArgs.apply(null, args)
|
||||
let [window, options, callback] = parseArgs(...args)
|
||||
if (options == null) {
|
||||
options = {
|
||||
title: 'Open',
|
||||
|
@ -97,7 +97,7 @@ module.exports = {
|
|||
showSaveDialog: function (...args) {
|
||||
var wrappedCallback
|
||||
checkAppInitialized()
|
||||
let [window, options, callback] = parseArgs.apply(null, args)
|
||||
let [window, options, callback] = parseArgs(...args)
|
||||
if (options == null) {
|
||||
options = {
|
||||
title: 'Save'
|
||||
|
@ -130,7 +130,7 @@ module.exports = {
|
|||
showMessageBox: function (...args) {
|
||||
var flags, i, j, len, messageBoxType, ref2, ref3, text
|
||||
checkAppInitialized()
|
||||
let [window, options, callback] = parseArgs.apply(null, args)
|
||||
let [window, options, callback] = parseArgs(...args)
|
||||
if (options == null) {
|
||||
options = {
|
||||
type: 'none'
|
||||
|
@ -185,7 +185,7 @@ module.exports = {
|
|||
},
|
||||
|
||||
showErrorBox: function (...args) {
|
||||
return binding.showErrorBox.apply(binding, args)
|
||||
return binding.showErrorBox(...args)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue