@@ -652,7 +652,7 @@ function ImmediateList() {
652652// Appends an item to the end of the linked list, adjusting the current tail's
653653// previous and next pointers where applicable
654654ImmediateList . prototype . append = function ( item ) {
655- if ( this . tail ) {
655+ if ( this . tail !== null ) {
656656 this . tail . _idleNext = item ;
657657 item . _idlePrev = this . tail ;
658658 } else {
@@ -664,11 +664,11 @@ ImmediateList.prototype.append = function(item) {
664664// Removes an item from the linked list, adjusting the pointers of adjacent
665665// items and the linked list's head or tail pointers as necessary
666666ImmediateList . prototype . remove = function ( item ) {
667- if ( item . _idleNext ) {
667+ if ( item . _idleNext !== null ) {
668668 item . _idleNext . _idlePrev = item . _idlePrev ;
669669 }
670670
671- if ( item . _idlePrev ) {
671+ if ( item . _idlePrev !== null ) {
672672 item . _idlePrev . _idleNext = item . _idleNext ;
673673 }
674674
@@ -694,7 +694,7 @@ function processImmediate() {
694694 // immediate callbacks are executed
695695 immediateQueue . head = immediateQueue . tail = null ;
696696
697- while ( immediate ) {
697+ while ( immediate !== null ) {
698698 domain = immediate . domain ;
699699
700700 if ( ! immediate . _onImmediate ) {
@@ -715,7 +715,7 @@ function processImmediate() {
715715
716716 // If `clearImmediate(immediate)` wasn't called from the callback, use the
717717 // `immediate`'s next item
718- if ( immediate . _idleNext )
718+ if ( immediate . _idleNext !== null )
719719 immediate = immediate . _idleNext ;
720720 else
721721 immediate = next ;
@@ -747,11 +747,11 @@ function tryOnImmediate(immediate, oldTail) {
747747 }
748748 }
749749
750- if ( threw && immediate . _idleNext ) {
750+ if ( threw && immediate . _idleNext !== null ) {
751751 // Handle any remaining on next tick, assuming we're still alive to do so.
752752 const curHead = immediateQueue . head ;
753753 const next = immediate . _idleNext ;
754- if ( curHead ) {
754+ if ( curHead !== null ) {
755755 curHead . _idlePrev = oldTail ;
756756 oldTail . _idleNext = curHead ;
757757 next . _idlePrev = null ;
0 commit comments