-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Fail gracefully on invalid Link to values #10367
Conversation
🦋 Changeset detectedLatest commit: f533024 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 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 |
isExternal = true; | ||
} | ||
} catch (e) { | ||
// We can't do external URL detection without a valid URL |
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.
useful to check whether e instanceof TypeError
or rethrow? https://developer.mozilla.org/en-US/docs/Web/API/URL/URL#exceptions
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.
Part of the goal here is that a broken link is better than a crashed render (see remix-run/remix#5440 (comment)), so I don't think re-throwing is what we want to do.
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.
fair
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
Closes remix-run/remix#5440