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
|
@ -60,8 +60,8 @@ const splitPath = (archivePathOrBuffer: string | Buffer) => {
|
|||
// Convert asar archive's Stats object to fs's Stats object.
|
||||
let nextInode = 0;
|
||||
|
||||
const uid = process.getuid != null ? process.getuid() : 0;
|
||||
const gid = process.getgid != null ? process.getgid() : 0;
|
||||
const uid = process.getuid?.() ?? 0;
|
||||
const gid = process.getgid?.() ?? 0;
|
||||
|
||||
const fakeTime = new Date();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue