fix: no-arg console.log is undefined (#22165)
This commit is contained in:
Родитель
d1fd237e61
Коммит
5e7c594691
|
@ -18,8 +18,10 @@ require('@electron/internal/common/init')
|
|||
if (process.platform === 'win32') {
|
||||
// Redirect node's console to use our own implementations, since node can not
|
||||
// handle console output when running as GUI program.
|
||||
const consoleLog = (format: any, ...args: any[]) => {
|
||||
return process.log(util.format(format, ...args) + '\n')
|
||||
const consoleLog = (...args: any[]) => {
|
||||
// @ts-ignore this typing is incorrect; 'format' is an optional parameter
|
||||
// See https://nodejs.org/api/util.html#util_util_format_format_args
|
||||
return process.log(util.format(...args) + '\n')
|
||||
}
|
||||
const streamWrite: NodeJS.WritableStream['write'] = function (chunk: Buffer | string, encoding?: any, callback?: Function) {
|
||||
if (Buffer.isBuffer(chunk)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче