Skip to content

Commit c51a96d

Browse files
authored
fix: rule matcher typo (#205)
1 parent e6417be commit c51a96d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ declare module 'nitropack' {
469469
ctx: import('${typesPath}').HookRobotsConfigContext
470470
nuxtContentUrls?: Set<string>
471471
},
472-
_robotsRuleMactcher: (url: string) => string
472+
_robotsRuleMatcher: (url: string) => string
473473
}
474474
interface NitroRouteRules {
475475
robots?: boolean | string | {

src/runtime/server/composables/getPathRobotConfig.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export function getPathRobotConfig(e: H3Event, options?: { userAgent?: string, s
8585
}
8686

8787
// 3. nitro route rules
88-
nitroApp._robotsRuleMactcher = nitroApp._robotsRuleMactcher || createNitroRouteRuleMatcher(e)
88+
nitroApp._robotsRuleMatcher = nitroApp._robotsRuleMatcher || createNitroRouteRuleMatcher(e)
8989
let routeRulesPath = path
9090
// if we're using i18n we need to strip leading prefixes so the rule will match
9191
if (runtimeConfig.public?.i18n?.locales) {
@@ -95,7 +95,7 @@ export function getPathRobotConfig(e: H3Event, options?: { userAgent?: string, s
9595
routeRulesPath = routeRulesPath.replace(`/${locale.code}`, '')
9696
}
9797
}
98-
const routeRules = normaliseRobotsRouteRule(nitroApp._robotsRuleMactcher(routeRulesPath))
98+
const routeRules = normaliseRobotsRouteRule(nitroApp._robotsRuleMatcher(routeRulesPath))
9999
if (routeRules && (typeof routeRules.allow !== 'undefined' || typeof routeRules.rule !== 'undefined')) {
100100
return {
101101
indexable: routeRules.allow,

0 commit comments

Comments
 (0)