prgm-dev / sveltekit-progress-bar

A SvelteKit progress bar that shows on navigation
MIT License
35 stars 2 forks source link

Having navigation fail/cancel leaves progressbar hanging #5

Open bertmad3400 opened 2 months ago

bertmad3400 commented 2 months ago

As this library doesn't use the "complete" promise from beforeNavigate, but instead uses afterNavigate to "finish" the progress-bar, it fails to take into account navigations which fails or are cancelled. I would imagine the most common occurrence of this (which is the one I ran into) is cancelling the navigation during beforeNavigate using the cancel param, which will just leave the progress-bar hanging giving an impression of a broken app