mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
perf(nuxt): reduce multiple calls to .toLowerCase()
(#22743)
This commit is contained in:
parent
aa37de48f7
commit
e94b30d314
@ -38,7 +38,8 @@ export async function scanComponents (dirs: ComponentsDir[], srcDir: string): Pr
|
||||
|
||||
const directory = basename(dir.path)
|
||||
if (!siblings.includes(directory)) {
|
||||
const caseCorrected = siblings.find(sibling => sibling.toLowerCase() === directory.toLowerCase())
|
||||
const directoryLowerCase = directory.toLowerCase()
|
||||
const caseCorrected = siblings.find(sibling => sibling.toLowerCase() === directoryLowerCase)
|
||||
if (caseCorrected) {
|
||||
const nuxt = useNuxt()
|
||||
const original = relative(nuxt.options.srcDir, dir.path)
|
||||
|
Loading…
Reference in New Issue
Block a user