File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Open diff view settings
Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Open diff view settings
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ ObjectDefineProperty(setTimeout, customPromisify, {
171171} ) ;
172172
173173function clearTimeout ( timer ) {
174- if ( timer && timer . _onTimeout ) {
174+ if ( timer ? ._onTimeout ) {
175175 timer . _onTimeout = null ;
176176 unenroll ( timer ) ;
177177 return ;
Original file line number Diff line number Diff line change @@ -49,10 +49,7 @@ function setTimeout(after, value, options = {}) {
4949 'boolean' ,
5050 ref ) ) ;
5151 }
52- // TODO(@jasnell): If a decision is made that this cannot be backported
53- // to 12.x, then this can be converted to use optional chaining to
54- // simplify the check.
55- if ( signal && signal . aborted ) {
52+ if ( signal ?. aborted ) {
5653 return PromiseReject ( new AbortError ( ) ) ;
5754 }
5855 let oncancel ;
@@ -94,10 +91,7 @@ function setImmediate(value, options = {}) {
9491 'boolean' ,
9592 ref ) ) ;
9693 }
97- // TODO(@jasnell): If a decision is made that this cannot be backported
98- // to 12.x, then this can be converted to use optional chaining to
99- // simplify the check.
100- if ( signal && signal . aborted ) {
94+ if ( signal ?. aborted ) {
10195 return PromiseReject ( new AbortError ( ) ) ;
10296 }
10397 let oncancel ;
You can’t perform that action at this time.
0 commit comments