8000 fix(nuxt): do not warn about invalid characters in route groups/catch… · nuxt/nuxt@0249c74 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0249c74

Browse files
committed
fix(nuxt): do not warn about invalid characters in route groups/catchalls
1 parent 8a0350d commit 0249c74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/nuxt/src/pages/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ function parseSegment (segment: string, absolutePath: string) {
424424
state = SegmentParserState.initial
425425
} else if (c && PARAM_CHAR_RE.test(c)) {
426426
buffer += c
427-
} else {
427+
} else if (state === SegmentParserState.dynamic || state === SegmentParserState.optional) {
428428
logger.warn(`'\`${c}\`' is not allowed in a dynamic route parameter and has been ignored. Consider renaming \`${absolutePath}\`.`)
429429
}
430430
break

0 commit comments

Comments
 (0)
0