- 
                Notifications
    
You must be signed in to change notification settings  - Fork 173
 
Open
Labels
pr welcomeGladly accept a PR for this issueGladly accept a PR for this issue
Description
Describe the bug
I have this route setup currentlly:
<HashRouter>
        <Route path="/:roomId?" component={App} matchFilters={{
            roomId: /^(!|\$|#)/ // Match $ or # for the roomId
        }} />
        <Route path="/login" component={Login} />
</HashRouter>Using http://localhost:5173/#/$test works, using http://localhost:5173/#/!test works but using http://localhost:5173/#/#test causes the roomId param to be undefined when using it.
Example usage is:
export default function App() {
    const params = useParams();
    return (
        <ErrorBoundary fallback={(err) => <div>Error: {err.message}</div>}>
            <div class="wrapper">
                <Show when={params.roomId} fallback={<p>No Room</p>} keyed>
                    <p>room</p>
                </Show>
            </div>
        </ErrorBoundary>
    )
}Your Example Website or App
See the above for a minimal example of the issue.
Steps to Reproduce the Bug or Issue
See above for a minimal example of the issue and how to reproduce it please.
Expected behavior
I would expect that #test is equally valid as any other string and isnt omitted.
Screenshots or Videos
No response
Platform
- OS: Linux Fedora 40
 - Browser: Firefox 128.0 (64-Bit)
 - Version: SolidJs ^1.8.18 | Solidjs-Router ^0.14.1
 
Additional context
I haven't checked the other routers as my app isnt SSR compatible
Metadata
Metadata
Assignees
Labels
pr welcomeGladly accept a PR for this issueGladly accept a PR for this issue