File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Open diff view settings
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Open diff view settings
Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments