mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
refactor: use optional chaining / nullish coalescing operator (#35217)
This commit is contained in:
@@ -68,7 +68,7 @@ const spawnUpdate = function (args: string[], detached: boolean, callback: Funct
|
||||
if (code !== 0) {
|
||||
// Disabled for backwards compatibility:
|
||||
// eslint-disable-next-line standard/no-callback-literal
|
||||
return callback(`Command failed: ${signal != null ? signal : code}\n${stderr}`);
|
||||
return callback(`Command failed: ${signal ?? code}\n${stderr}`);
|
||||
}
|
||||
|
||||
// Success.
|
||||
|
||||
Reference in New Issue
Block a user