refactor: use optional chaining / nullish coalescing operator (#35217)
This commit is contained in:
parent
76431ac1fa
commit
34b985c556
5 changed files with 7 additions and 8 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue