mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 17:35:57 +00:00
fix(nuxt): do not warn about [[
optional dynamic params (#30619)
This commit is contained in:
parent
f3e355a429
commit
f277030e71
@ -425,7 +425,9 @@ function parseSegment (segment: string, absolutePath: string) {
|
|||||||
} else if (c && PARAM_CHAR_RE.test(c)) {
|
} else if (c && PARAM_CHAR_RE.test(c)) {
|
||||||
buffer += c
|
buffer += c
|
||||||
} else if (state === SegmentParserState.dynamic || state === SegmentParserState.optional) {
|
} else if (state === SegmentParserState.dynamic || state === SegmentParserState.optional) {
|
||||||
logger.warn(`'\`${c}\`' is not allowed in a dynamic route parameter and has been ignored. Consider renaming \`${absolutePath}\`.`)
|
if (c !== '[' && c !== ']') {
|
||||||
|
logger.warn(`'\`${c}\`' is not allowed in a dynamic route parameter and has been ignored. Consider renaming \`${absolutePath}\`.`)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user