Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stackoverfloweth committed Jan 12, 2025
1 parent 3a0b0f4 commit 6ad8fc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/createRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ export function createRoute<
const TPropsGetter extends PropsGetter<TOptions, ToComponent<TOptions['component']>>
>(options: TOptions, ...args: WithProps<TOptions, TPropsGetter>): ToRoute<TOptions, TPropsGetter>

export function createRoute(options: CreateRouteOptions): Route {
export function createRoute(options: CreateRouteOptions, props?: () => any): Route {
const id = createRouteId()
const name = toName(options.name)
const path = toPath(options.path)
const query = toQuery(options.query)
const hash = toHash(options.hash)
const meta = options.meta ?? {}
const state = isWithState(options) ? options.state : {}
const rawRoute = markRaw({ id, meta: {}, state: {}, ...options })
const rawRoute = markRaw({ id, meta: {}, state: {}, props, ...options })

const route = {
id,
Expand Down

0 comments on commit 6ad8fc3

Please sign in to comment.