-
Notifications
You must be signed in to change notification settings - Fork 18
Incompatibility with latest version of Svelte(3.14.1) #62
Comments
In fact I came across this solution while tackling that very issue. You could use |
Thank you very much. I came here from https://github.com/EmilTholin/svelte-routing due "conditions" and "redirects" functionality on Route but with it I got errors too. I heartily recommend use Page.js with Svelte. Such as for example: https://spiffy.tech/blog/a-minimal-svelte-router/ |
thank you. your second version fixed it. i didn't try the first one. |
Svero is now deprecated. Check #68 for alternatives. |
To reproduce this bug, use
npx degit sveltejs/template
to use the latest version of Svelte with svero.The following lines from Route.svelte was causing an error:
as
arguments[0]['$$'].props
was in fact an object type after several updates from Svelte.However, on the same source,
Array.prototype.forEach
is used to iterate through the second argument ofgetProps
function, so the resulting error would show that the function does not exist.To fix, replace the line with the following or
add the following line within the
getProps
function to allow for backward compatibility.I've made this fix in my fork, which takes the former approach. I'd suggest the master branch to go with the latter if backward compatibility is preferred. Please look into this! Thank you.
The text was updated successfully, but these errors were encountered: