Remove special case. It seems to just break SSR.
I'm not 100% sure this is consistent with every way this might be used, but I ran into basically the same bug as #244, except I'm not using vite-plugin-ssr.
Note that I am on Svelte 4. (4.2.17)
One of the things that lead me to this was that
<Route component={Home} path="/" />
broke, but
<Route path="/"><Home /></Route>
didn't.
With this change, both appear to work identically. (Which means they work with both client rendering and SSR.)
Thanks for the PR. This will be a breaking change for large amount of people who are using this library. I need to test & wait for the next breaking release which will be after svelte v5 release.
Fair enough.
These lines also break component prop in case of svelte 5, as components are not classes anymore