Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pielambr committed Sep 25, 2019
1 parent fa6870e commit dcee1cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Router.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import { onMount } from 'svelte'
import { onMount, tick } from 'svelte'
export let routes = {}
export let notFound = false
export let includeQueryParameters = true
Expand All @@ -25,7 +25,7 @@
return { path, query }
}
function route () {
async function route () {
const urlParts = getURLParts()
const nextRoute = routes[urlParts.path]
Expand All @@ -50,6 +50,7 @@
}
}
await tick()
activeComponent = new nextRoute[0]({
target: getContainer(),
props: data
Expand Down

0 comments on commit dcee1cf

Please sign in to comment.