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()
|
return Menu.getApplicationMenu()
|
||||||
},
|
},
|
||||||
commandLine: {
|
commandLine: {
|
||||||
appendSwitch: bindings.appendSwitch,
|
appendSwitch (...args) {
|
||||||
appendArgument: bindings.appendArgument
|
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