We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b3900a commit d1817c3Copy full SHA for d1817c3
1 file changed
modules/RouteNode.js
@@ -184,6 +184,8 @@ export default class RouteNode {
184
}
185
186
buildPathFromSegments(segments, params = {}) {
187
+ if (!segments) return null
188
+
189
let searchParams = segments
190
.filter(s => s.parser.hasQueryParams)
191
.map(s => s.parser.queryParams);
@@ -194,7 +196,7 @@ export default class RouteNode {
194
196
.map(p => p + '=' + params[p])
195
197
.join('&')
198
- return segments ? segments.map(segment => segment.parser.build(params, {ignoreSearch: true})).join('') + (searchPart ? '?' + searchPart : '') : null
199
+ return segments.map(segment => segment.parser.build(params, {ignoreSearch: true})).join('') + (searchPart ? '?' + searchPart : '')
200
201
202
buildPath(routeName, params = {}) {
0 commit comments