Skip to content

Commit 465d72d

Browse files
fix: accept boolean value for globalAppMiddleware option (#423)
1 parent 3f07ce9 commit 465d72d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default defineNuxtPlugin(async (nuxtApp) => {
5858

5959
// 3. Enable the middleware, either globally or as a named `auth` option
6060
const { globalAppMiddleware } = useRuntimeConfig().public.auth
61-
if (globalAppMiddleware.isEnabled) {
61+
if (globalAppMiddleware === true || globalAppMiddleware.isEnabled) {
6262
addRouteMiddleware('auth', authMiddleware, {
6363
global: true
6464
})

0 commit comments

Comments
 (0)