Skip to content

Commit

Permalink
refactor: cleaner robots module check
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Sep 5, 2024
1 parent 99588eb commit b9a1be7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export default defineNuxtModule<ModuleOptions>({
}

let needsRobotsPolyfill = true
const robotsModuleName = hasNuxtModule('nuxt-simple-robots') ? 'nuxt-simple-robots' : hasNuxtModule('@nuxtjs/robots') ? '@nuxtjs/robots' : false
const robotsModuleName = ['nuxt-simple-robots', '@nuxtjs/robots'].find(s => hasNuxtModule(s))
if (robotsModuleName) {
const robotsVersion = await getNuxtModuleVersion(robotsModuleName)
// we want to keep versions in sync
Expand Down

0 comments on commit b9a1be7

Please sign in to comment.