Describe the bug
Routes are still mounted even with a middleware that should prevent access to them (via a simple redirect). The redirection works well, but it shouldn't even access the component before the redirection is done.
To Reproduce
Steps to reproduce the behavior:
Create a simple protected route with a console.log inside. Let's say /user
Use a custom middleware that simply redirect to another route. Let's say /
Access /user, you will see your console.log inside your protected route display in console.
Expected behavior
The route shouldn't mount or execute anything since there is a middleware and it purpose is to perform actions before accessing the actual path.
Desktop (please complete the following information):
Describe the bug Routes are still mounted even with a middleware that should prevent access to them (via a simple redirect). The redirection works well, but it shouldn't even access the component before the redirection is done.
To Reproduce Steps to reproduce the behavior:
Expected behavior The route shouldn't mount or execute anything since there is a middleware and it purpose is to perform actions before accessing the actual path.
Desktop (please complete the following information):
Additional context main.js:
App.svelte:
Editor.svelte:
Login.svelte: