Got this debugging another error. Filing here for reference. Original code: https://phabricator.intern.facebook.com/P59317705
}
        }
      }
    }
    if (hasUnhandledError) {
      const error = unhandledError;
      unhandledError = null;
      hasUnhandledError = false;
      throw error;
    }
  }
  function performWorkOnRoot(
    root: FiberRoot,
    expirationTime: ExpirationTime,
    isAsync: boolean,
  ) {
    invariant(
      !isRendering,
      'performWorkOnRoot was called recursively. This error is likely caused ' +
        'by a bug in React. Please file an issue.',
    );
    isRendering = true;
    
    if (!isAsync) {
      
      let finishedWork = root.finishedWork;
      if (finishedWork !== null) {
        
        completeRoot(root, finishedWork, expirationTime);
      } else {