chore: remove extra 'not' in warning message

This commit is contained in:
Daniel Roe 2024-01-30 13:16:05 +00:00
parent 658a0ffed7
commit b96fe1ecec
No known key found for this signature in database
GPG Key ID: 3714AB03996F442B

View File

@ -119,7 +119,7 @@ export async function resolveApp (nuxt: Nuxt, app: NuxtApp) {
const name = getNameFromPath(file, resolve(config.srcDir, layoutDir)) const name = getNameFromPath(file, resolve(config.srcDir, layoutDir))
if (!name) { if (!name) {
// Ignore files like `~/layouts/index.vue` which end up not having a name at all // Ignore files like `~/layouts/index.vue` which end up not having a name at all
logger.warn(`No layout name could not be resolved for \`~/${relative(nuxt.options.srcDir, file)}\`. Bear in mind that \`index\` is ignored for the purpose of creating a layout name.`) logger.warn(`No layout name could be resolved for \`~/${relative(nuxt.options.srcDir, file)}\`. Bear in mind that \`index\` is ignored for the purpose of creating a layout name.`)
continue continue
} }
app.layouts[name] = app.layouts[name] || { name, file } app.layouts[name] = app.layouts[name] || { name, file }
@ -135,7 +135,7 @@ export async function resolveApp (nuxt: Nuxt, app: NuxtApp) {
const name = getNameFromPath(file) const name = getNameFromPath(file)
if (!name) { if (!name) {
// Ignore files like `~/middleware/index.vue` which end up not having a name at all // Ignore files like `~/middleware/index.vue` which end up not having a name at all
logger.warn(`No middleware name could not be resolved for \`~/${relative(nuxt.options.srcDir, file)}\`. Bear in mind that \`index\` is ignored for the purpose of creating a middleware name.`) logger.warn(`No middleware name could be resolved for \`~/${relative(nuxt.options.srcDir, file)}\`. Bear in mind that \`index\` is ignored for the purpose of creating a middleware name.`)
continue continue
} }
app.middleware.push({ name, path: file, global: hasSuffix(file, '.global') }) app.middleware.push({ name, path: file, global: hasSuffix(file, '.global') })