solid-router icon indicating copy to clipboard operation
solid-router copied to clipboard

handleAnchor and `blob` links

Open titoBouzout opened this issue 2 years ago • 2 comments

Seems like handleAnchor errors when the link is a blob, like in the solid playground https://playground.solidjs.com/anonymous/778914e0-e4ea-4292-90e4-236336d33e61

titoBouzout avatar Feb 20 '24 22:02 titoBouzout

It seems like a.href doesn't have a complete URI when a link is in a blob. Maybe you can check if a.hostname is empty and somehow construct the full URI. https://github.com/solidjs/solid-router/blob/5ac8ff5045cfcf588e96063148840ff3a6e23ffb/src/data/events.ts#L38 I wanted to send a pull request, but all the basePath stuff is mysterious enough. It costs nothing to add 1 line comment on a logic condition on the lines of "this check for X because Y and Z happens"

titoBouzout avatar Feb 23 '24 03:02 titoBouzout

Honestly I don't know. Which is sort of the challenge with the router. Most the core logic was authored by the previous maintainer, and then was augmented by the community. I've been looking for people interested in helping maintaining the router because I haven't had the chance to look that deeply in how it works.

ryansolid avatar Feb 27 '24 22:02 ryansolid