Skip to content

Commit

Permalink
feat: added router.rendered promise
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobrosenberg committed Feb 10, 2025
1 parent 4c2dd1c commit e8985a2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/runtime/Router/Router.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ export class Router {
(!this.pendingRoute.get() && this.activeRoute.get()) ||
next(this.activeRoute, x => !!x)

rendered = async () => {
await this.ready()
await this.activeRoute.get().rendered
}

/** @type {Map<string, Route>} */
history = new Map()

Expand Down

0 comments on commit e8985a2

Please sign in to comment.