mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
🔧 Ensure correct types for commandLine
This commit ensures that arguments passed to `appendSwitch` and `appendArgument` are turned into strings before passing them over to the binding.
This commit is contained in:
committed by
Kevin Sawicki
parent
90bff4d9de
commit
29fa48d8c3
@@ -24,15 +24,15 @@ Object.assign(app, {
|
||||
return Menu.getApplicationMenu()
|
||||
},
|
||||
commandLine: {
|
||||
appendSwitch() {
|
||||
let castedArgs = [...arguments].map((arg) => {
|
||||
appendSwitch (...args) {
|
||||
const castedArgs = args.map((arg) => {
|
||||
return typeof arg !== 'string' ? `${arg}` : arg
|
||||
})
|
||||
|
||||
return binding.appendSwitch(...castedArgs)
|
||||
},
|
||||
appendArgument() {
|
||||
let castedArgs = [...arguments].map((arg) => {
|
||||
appendArgument (...args) {
|
||||
const castedArgs = [...arguments].map((arg) => {
|
||||
return typeof arg !== 'string' ? `${arg}` : arg
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user