Skip to content

Commit b382a4f

Browse files
authored
Apply suggestions from code review
1 parent ffeadc0 commit b382a4f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: src/composables/guards.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ export function onBeforeRouteLeave (guard) {
3535
}
3636

3737
function registerGuard (router, guard, fn, depth) {
38-
return router.beforeEach((to, from, next) => {
39-
return fn(to, from, depth) ? guard(to, from, next) : next()
40-
})
38+
return router.beforeEach((to, from, next) =>
39+
fn(to, from, depth) ? guard(to, from, next) : next()
40+
)
4141
}
4242

4343
const noop = () => {}
@@ -70,7 +70,7 @@ function useFilteredGuard (guard, fn) {
7070
})
7171
onDeactivated(() => {
7272
removeGuard()
73-
removeGuard = null // reset removeGuard
73+
removeGuard = null
7474
})
7575

7676
return removeGuard

0 commit comments

Comments
 (0)