Skip to content

Commit

Permalink
fix: always show indicator in app router (#74758)
Browse files Browse the repository at this point in the history
When there are no errors, we show `Errors` component with `minimized`
status, which means that it should only render the indicator on the
bottom left corner of the screen. E2E tests for the new DevOverlay will
be added later.
  • Loading branch information
gaojude authored Jan 11, 2025
1 parent 5778fd4 commit fefb2be
Showing 1 changed file with 9 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export default class ReactDevOverlay extends React.PureComponent<
const { isReactError } = this.state

const hasBuildError = state.buildError != null
const hasRuntimeErrors = Boolean(state.errors.length)
const hasStaticIndicator = state.staticIndicator
const debugInfo = state.debugInfo

Expand Down Expand Up @@ -69,21 +68,15 @@ export default class ReactDevOverlay extends React.PureComponent<
versionInfo={state.versionInfo}
/>
) : (
<>
{hasRuntimeErrors ? (
<Errors
isTurbopackEnabled={!!process.env.TURBOPACK}
isAppDir={true}
initialDisplayState={
isReactError ? 'fullscreen' : 'minimized'
}
errors={state.errors}
versionInfo={state.versionInfo}
hasStaticIndicator={hasStaticIndicator}
debugInfo={debugInfo}
/>
) : null}
</>
<Errors
isTurbopackEnabled={!!process.env.TURBOPACK}
isAppDir={true}
initialDisplayState={isReactError ? 'fullscreen' : 'minimized'}
errors={state.errors}
versionInfo={state.versionInfo}
hasStaticIndicator={hasStaticIndicator}
debugInfo={debugInfo}
/>
)}
</ShadowPortal>
</>
Expand Down

0 comments on commit fefb2be

Please # to comment.