mirror of https://github.com/nodejs/node.git
timers: cleanup no-longer relevant TODOs in timers/promises
PR-URL: https://github.com/nodejs/node/pull/46499 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>pull/46600/head
parent
03854f6487
commit
06b28fbadc
|
@ -70,10 +70,8 @@ function setTimeout(after, value, options = kEmptyObject) {
|
|||
'boolean',
|
||||
ref));
|
||||
}
|
||||
// TODO(@jasnell): If a decision is made that this cannot be backported
|
||||
// to 12.x, then this can be converted to use optional chaining to
|
||||
// simplify the check.
|
||||
if (signal && signal.aborted) {
|
||||
|
||||
if (signal?.aborted) {
|
||||
return PromiseReject(new AbortError(undefined, { cause: signal.reason }));
|
||||
}
|
||||
let oncancel;
|
||||
|
@ -113,10 +111,8 @@ function setImmediate(value, options = kEmptyObject) {
|
|||
'boolean',
|
||||
ref));
|
||||
}
|
||||
// TODO(@jasnell): If a decision is made that this cannot be backported
|
||||
// to 12.x, then this can be converted to use optional chaining to
|
||||
// simplify the check.
|
||||
if (signal && signal.aborted) {
|
||||
|
||||
if (signal?.aborted) {
|
||||
return PromiseReject(new AbortError(undefined, { cause: signal.reason }));
|
||||
}
|
||||
let oncancel;
|
||||
|
|
Loading…
Reference in New Issue