diff --git a/lib/runtime/helpers/index.js b/lib/runtime/helpers/index.js index 519dacf4..82019435 100644 --- a/lib/runtime/helpers/index.js +++ b/lib/runtime/helpers/index.js @@ -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