Description
Version
3.0.1
Reproduction link
https://jsbin.com/zaxupuj/edit?html,js
Steps to reproduce
Create a file that exports an object containing an in-component navigation guard for beforeRouteEnter. The code contained within this guard does not effect the issue from occurring. Create a Vue component, register it, and then on that Vue component, attempt to use that mixin. Also make sure that you are using vue-router as a plugin, and that the component that you are navigating to with your vue-router is the vue component that you added the mixin with the naviation guard to.
What is expected?
I expected the beforeRouteEnter guard to be executed as if it had existed within the Vue component that I was navigating to using vue-router.
What is actually happening?
I am encountering an exception when Vue is attempting to call checkComponent with 'TypeError: options is undefined'. Here is a stack trace if it helps.
checkComponents@http://twidur.com/js/app.js:23199:1 mergeOptions@http://twidur.com/js/app.js:23320:5 mergeOptions@http://twidur.com/js/app.js:23336:16 initExtend/Vue.extend@http://twidur.com/js/app.js:26615:19 extractGuard@http://twidur.com/js/app.js:3175:11 extractGuards/guards<@http://twidur.com/js/app.js:3159:17
(1) This is my first issue I've submitted, sorry if it is not structured the way you like Evan, I know you're picky.
(2) This issue existed before and was fixed with Pull request #1521 on Jun 28, 2017
(3) If my JSBin is garbage, I do apologize! Never used that either, I usually don't make these types of reports because Vue is so well built :)