Closed stackoverfloweth closed 2 days ago
Name | Link |
---|---|
Latest commit | 77ead93f1b71ad95de2f3a3bcc95d16f90b533a1 |
Latest deploy log | https://app.netlify.com/sites/kitbag-router/deploys/6685f0359cdb1d00080cb2cb |
Deploy Preview | https://deploy-preview-212--kitbag-router.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Solution was to update click handler on underlying
a
tag, avoid pushing to router if route is external.This solution is incomplete. A better solution will be moving this responsibility deeper into router. That would also prevent this bug if a developer calls
router.push('https://router.kitbag.dev')
. Currently the router-link compares the host of the resolved url againstwindow.location.host
. We probably shouldn't move that similar logic into the router since we can't guarantee the user isn't in a Node environment.I will continue working towards a more complete solution. I'm considering, and welcome feedback on the following ideas:
host
as an option when callingcreateRouter
initialUrl
window
else throwing error