mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-24 14:45:15 +00:00
chore: revert formatting
This commit is contained in:
parent
4f61aa3d6f
commit
bf0c77db89
@ -12,7 +12,7 @@ import { loadNuxtModuleInstance } from './install'
|
|||||||
*/
|
*/
|
||||||
export function hasNuxtModule (moduleName: string, nuxt: Nuxt = useNuxt()) : boolean {
|
export function hasNuxtModule (moduleName: string, nuxt: Nuxt = useNuxt()) : boolean {
|
||||||
return nuxt.options._installedModules.some(({ meta }) => meta.name === moduleName) ||
|
return nuxt.options._installedModules.some(({ meta }) => meta.name === moduleName) ||
|
||||||
nuxt.options.modules.includes(moduleName)
|
nuxt.options.modules.includes(moduleName)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,7 +40,7 @@ export async function getNuxtModuleVersion (module: string | NuxtModule, nuxt: N
|
|||||||
if (!moduleMeta.name) { return false }
|
if (!moduleMeta.name) { return false }
|
||||||
// maybe the version got attached within the installed module instance?
|
// maybe the version got attached within the installed module instance?
|
||||||
const version = nuxt.options._installedModules
|
const version = nuxt.options._installedModules
|
||||||
// @ts-expect-error _installedModules is not typed
|
// @ts-expect-error _installedModules is not typed
|
||||||
.filter(m => m.meta.name === moduleMeta.name).map(m => m.meta.version)?.[0]
|
.filter(m => m.meta.name === moduleMeta.name).map(m => m.meta.version)?.[0]
|
||||||
if (version) {
|
if (version) {
|
||||||
return version
|
return version
|
||||||
|
Loading…
Reference in New Issue
Block a user