Skip to content

fix: handle preview thumbnail fetch failures - #2054

Open
ArianMoeini wants to merge 1 commit into
cookpete:masterfrom
ArianMoeini:fix/preview-thumbnail-fetch-error
Open

ArianMoeini wants to merge 1 commit into
cookpete:masterfrom
ArianMoeini:fix/preview-thumbnail-fetch-error

Conversation

@ArianMoeini

Copy link
Copy Markdown

Summary

  • Handle failed oEmbed thumbnail requests without an unhandled rejection, leaving the light mode preview clickable.
  • Ignore late responses after the source or preview image changes so they cannot replace the current thumbnail.
  • Cover a rejected request and a late response with a focused Preview test.

Fixes #1935.

Validation

  • NODE_OPTIONS=--no-experimental-global-navigator npm test (passes)
  • npm run types (passes)
  • npm run lint (passes)

The Node option is needed because the project's test shim writes globalThis.navigator, which Node 24 provides as a read-only global by default.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error Handling Missing in fetchImage Call in Preview Component

1 participant