Nuxt/test/fixtures/basic/middleware/b.global.ts

6 lines
198 B
TypeScript

export default defineNuxtRouteMiddleware((to) => {
if (to.path === '/middleware/ordering' && !useNuxtApp().extendsMiddleware) {
return createError('extendsMiddleware not set in layer')
}
})