Skip to content

Commit

Permalink
fix: allow returning Route from defineNuxtRouteMiddleware (#878)
Browse files Browse the repository at this point in the history
  • Loading branch information
wattanx authored Aug 14, 2023
1 parent 01d9544 commit f09aafd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/bridge/src/runtime/composables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export const abortNavigation = (err?: string | Partial<NuxtError>) => {
throw err
}

type RouteMiddlewareReturn = void | Error | string | Location | boolean
type RouteMiddlewareReturn = void | Error | string | Location | boolean | Route

export interface RouteMiddleware {
(to: Route, from: Route): RouteMiddlewareReturn | Promise<RouteMiddlewareReturn>
Expand Down

0 comments on commit f09aafd

Please sign in to comment.