fix(kit): module compatibility not working with module names

This commit is contained in:
Harlan Wilton 2023-07-06 12:36:49 +10:00
parent 88f914e9a0
commit 6cabe69ce0
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ export async function getNuxtModuleVersion (module: string | NuxtModule, nuxt: N
return version
}
// it's possible that the module will be installed, it just hasn't been done yet, preemptively load the instance
if (typeof module !== 'string' && nuxt.options.modules.includes(moduleMeta.name)) {
if (nuxt.options.modules.includes(moduleMeta.name)) {
const { buildTimeModuleMeta } = await loadNuxtModuleInstance(moduleMeta.name, nuxt)
return buildTimeModuleMeta.version || false
}