-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove instanceof Response checks in favor of isResponse #4782
Remove instanceof Response checks in favor of isResponse #4782
Conversation
🦋 Changeset detectedLatest commit: f2ac118 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -103,5 +124,12 @@ test.describe("loader in an app", () => { | |||
let app = new PlaywrightFixture(appFixture, page); | |||
await app.goto("/redirect"); | |||
expect(await app.getHtml()).toMatch(HOME_PAGE_TEXT); | |||
expect(await app.getHtml()).toMatch(REDIRECT_TARGET_TEXT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strengthened the existing redirect tests a bit to ensure it renders the right content at the redirected location.
`, | ||
"app/routes/fetch.jsx": js` | ||
export function loader({ request }) { | ||
return fetch(new URL(request.url).origin + '/fetch-target'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the case we're fixing here - returning a raw fetch
Response
wasn't matching our instanceof Response
check
* Remove instanceof Response checks in favor of isResponse * Add changeset * Bump to @remix-run/router 1.0.5-pre.1
Fixes #4741 by using
isResponse
instead ofinstanceof Response
Note: integration tests will fail until we get
@remix-run/server-runtime
onto the latest@remix-run/router