Use optional chaining

This commit is contained in:
Michael Lumish 2020-02-28 11:19:07 -08:00 committed by GitHub
parent c0f53f2238
commit f345f82851
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -101,7 +101,8 @@ export class SubchannelPool {
}, REF_CHECK_INTERVAL);
// Unref because this timer should not keep the event loop running.
this.cleanupTimer.unref && this.cleanupTimer.unref();
// Call unref only if it exists to address electron/electron#21162
this.cleanupTimer.unref?.();
}
}