Skip to content

Commit 9b58857

Browse files
jasnelldanielleadams
authored andcommitted
timers: cleanup no-longer relevant TODOs in timers/promises
PR-URL: #46499 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 4d81124 commit 9b58857

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

‎lib/timers/promises.js‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,8 @@ function setTimeout(after, value, options = kEmptyObject) {
7070
'boolean',
7171
ref));
7272
}
73-
// TODO(@jasnell): If a decision is made that this cannot be backported
74-
// to 12.x, then this can be converted to use optional chaining to
75-
// simplify the check.
76-
if(signal&&signal.aborted){
73+
74+
if(signal?.aborted){
7775
returnPromiseReject(newAbortError(undefined,{cause: signal.reason}));
7876
}
7977
letoncancel;
@@ -113,10 +111,8 @@ function setImmediate(value, options = kEmptyObject) {
113111
'boolean',
114112
ref));
115113
}
116-
// TODO(@jasnell): If a decision is made that this cannot be backported
117-
// to 12.x, then this can be converted to use optional chaining to
118-
// simplify the check.
119-
if(signal&&signal.aborted){
114+
115+
if(signal?.aborted){
120116
returnPromiseReject(newAbortError(undefined,{cause: signal.reason}));
121117
}
122118
letoncancel;

0 commit comments

Comments
 (0)