Merge pull request #7227 from electron/felix-cmd-strings
Ensure correct types for commandLine
This commit is contained in:
commit
e8f3cf164b
1 changed files with 12 additions and 2 deletions
|
@ -24,8 +24,18 @@ Object.assign(app, {
|
|||
return Menu.getApplicationMenu()
|
||||
},
|
||||
commandLine: {
|
||||
appendSwitch: bindings.appendSwitch,
|
||||
appendArgument: bindings.appendArgument
|
||||
appendSwitch (...args) {
|
||||
const castedArgs = args.map((arg) => {
|
||||
return typeof arg !== 'string' ? `${arg}` : arg
|
||||
})
|
||||
return bindings.appendSwitch(...castedArgs)
|
||||
},
|
||||
appendArgument (...args) {
|
||||
const castedArgs = args.map((arg) => {
|
||||
return typeof arg !== 'string' ? `${arg}` : arg
|
||||
})
|
||||
return bindings.appendArgument(...castedArgs)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue