Got this debugging another error. Filing here for reference. Original code: https://phabricator.intern.facebook.com/P59317705
stopWorkLoopTimer(interruptedBy);
    interruptedBy = null;
    isWorking = false;
    
    if (didFatal) {
      
      if (__DEV__) {
        stack.resetStackAfterFatalErrorInDev();
      }
      return null;
    } else if (nextUnitOfWork === null) {
      
      if (isRootReadyForCommit) {
        
        root.pendingCommitExpirationTime = expirationTime;
        const finishedWork = root.current.alternate;
        return finishedWork;
      } else {
        
        invariant(
          false,
          'Expired work should have completed. This error is likely caused ' +
            'by a bug in React. Please file an issue.',
        );
      }
    } else {
      
      
      return null;