File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -298,9 +298,8 @@ function handledRejection(promise) {
298
298
if ( promiseInfo !== undefined ) {
299
299
maybeUnhandledPromises . delete ( promise ) ;
300
300
if ( promiseInfo . warned ) {
301
- const { uid } = promiseInfo ;
302
301
// Generate the warning object early to get a good stack trace.
303
- const warning = new PromiseRejectionHandledWarning ( uid ) ;
302
+ const warning = new PromiseRejectionHandledWarning ( promiseInfo . uid ) ;
304
303
ArrayPrototypePush ( asyncHandledRejections , { promise, warning } ) ;
305
304
setHasRejectionToWarn ( true ) ;
306
305
}
@@ -457,9 +456,9 @@ function getUnhandledRejectionsMode() {
457
456
// a warning to be emitted which requires the microtask and next tick
458
457
// queues to be drained again.
459
458
function processPromiseRejections ( ) {
460
- let maybeScheduledTicksOrMicrotasks = asyncHandledRejections . length > 0 ;
459
+ let maybeScheduledTicksOrMicrotasks = asyncHandledRejections . length !== 0 ;
461
460
462
- while ( asyncHandledRejections . length > 0 ) {
461
+ while ( asyncHandledRejections . length !== 0 ) {
463
462
const { promise, warning } = ArrayPrototypeShift ( asyncHandledRejections ) ;
464
463
if ( ! process . emit ( 'rejectionHandled' , promise ) ) {
465
464
process . emitWarning ( warning ) ;
You can’t perform that action at this time.
0 commit comments