Skip to content

Commit cc68f90

Browse files
committed
Remove broken vue-router navigation guard
Passing a callback to `next()` is only supported in `beforeRouterEnter()`, not `beforeRouterUpdate()`, so that was not doing anything this whole time. See https://v3.router.vuejs.org/guide/advanced/navigation-guards.html#in-component-guards
1 parent 9948c66 commit cc68f90

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

src/mixins/subscriptionView.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,5 @@ export default {
3636
next(vm => {
3737
vm.$workflowService.startSubscriptions()
3838
})
39-
},
40-
beforeRouteUpdate (to, from, next) {
41-
next(vm => {
42-
vm.$workflowService.startSubscriptions()
43-
})
4439
}
4540
}

tests/unit/mixins/subscriptionView.spec.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,4 @@ describe('Subscription View mixin', () => {
4141
})
4242
expect(workflowService.startSubscriptions.calledOnce).to.equal(true)
4343
})
44-
it('should provide a navigation guard for when the view is updated', () => {
45-
const component = Object.assign(subscriptionViewMixin)
46-
const vm = {
47-
$workflowService: workflowService
48-
}
49-
component.beforeRouteUpdate(null, null, (callback) => {
50-
callback(vm)
51-
})
52-
expect(workflowService.startSubscriptions.calledOnce).to.equal(true)
53-
})
5444
})

0 commit comments

Comments
 (0)