next.js
8d46526f - fix: do not run onStage listeners for stages that were aborted (#95684)

Commit
3 days ago
fix: do not run onStage listeners for stages that were aborted (#95684) Small fix for `StageRenderingController.onStage` -- the `StageTrigger` implementation that `onStage` is based around would immediately fire the callback if the stage trigger was cancelled (i.e. if we aborted the render and won't reach the stage). The intention was to only fire it synchronously if the trigger was fired (i.e. we advanced to the stage) Luckily it looks like we have literally one usage of `onStage` right now: in `countShellAndStaticStageBytes`, which is only used in full renders that don't abort, so this shouldn't be a factor, but still worth doing for future-proofing
Author
Parents
Loading