Skip to content

Commit 31ab4e6

Browse files
fix: properly serialize page name
1 parent 4e08d4e commit 31ab4e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export default defineNuxtModule<ModuleOptions>({
4343
continue
4444
}
4545

46-
functionBody.push(` if(to.name === \`${page.name}\`) {`)
46+
functionBody.push(` if(to.name === ${JSON.stringify(page.name)}) {`)
4747

4848
// open to suggestion to fix this one
4949
// eslint-disable-next-line regexp/no-super-linear-backtracking

0 commit comments

Comments
 (0)