Skip to content

Using beforeRouteEnter in global mixins not working #2871

@WhoisUnknown

Description

@WhoisUnknown

Version

3.1.1

Reproduction link

https://codesandbox.io/s/vue-template-7z1uq

Steps to reproduce

  1. Create minimal App with vue router.
  2. Register global mixin with hook beforeRouterEnter
  3. Try to open page

What is expected?

A working beforeRouterEnter hook in all components in app

What is actually happening?

Get error in console " TypeError: guard is not a function
at routeEnterGuard (vue-router.common.js:2242)..."


This worked in vue 2.5.21

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions