Use spread syntax instead of function apply

This commit is contained in:
Kevin Sawicki 2016-12-01 14:37:03 -08:00
parent f72942bff1
commit c8ff67ab75
12 changed files with 30 additions and 34 deletions

View file

@ -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)
}
}