Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6f24f06

Browse filesBrowse files
jasnellMylesBorins
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 6bf7388 commit 6f24f06
Copy full SHA for 6f24f06

File tree

Expand file treeCollapse file tree

1 file changed

+4
-8
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-8
lines changed
Open diff view settings
Collapse file

‎lib/timers/promises.js‎

Copy file name to clipboardExpand all lines: lib/timers/promises.js
+4-8Lines 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
return PromiseReject(new AbortError(undefined, { cause: signal.reason }));
7876
}
7977
let oncancel;
@@ -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
return PromiseReject(new AbortError(undefined, { cause: signal.reason }));
121117
}
122118
let oncancel;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.