Skip to content

Commit

Permalink
feat: null support for $url and $goto
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobrosenberg committed Oct 4, 2024
1 parent 849311f commit 21a1e1f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/runtime/helpers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,12 @@ export const createUrl =
(fragment, router) =>
/** @type {UrlFromString} */
(pathOrNode, userParams = {}, options = {}) => {
let _inputPath = typeof pathOrNode === 'string' ? pathOrNode : pathOrNode?.path
let _inputPath =
typeof pathOrNode === 'string'
? pathOrNode
: pathOrNode === null
? '$leaf'
: pathOrNode?.path
const route = fragment.route

// in case we swapped the routes tree (rootNode), make sure we find
Expand Down

0 comments on commit 21a1e1f

Please sign in to comment.