In the following sample, the middleware Nuxt hook isn't being picked up.
middleware is listed amongst the list of supported Nuxt hooks.
import { Component, Vue } from "nuxt-property-decorator"
@Component
export default class CreateUserDialog extends Vue {
middleware = 'redirect' // This hook is ignored and a `data` field is registered
}
Workaround
Pass the hook directly to the underlying object
import { Component, Vue } from "nuxt-property-decorator"
@Component ({ middleware: 'redirect'})
export default class CreateUserDialog extends Vue {
...
}
Description
In the following sample, the
middleware
Nuxt hook isn't being picked up.middleware
is listed amongst the list of supported Nuxt hooks.Workaround
Pass the hook directly to the underlying object