mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 22:17:30 -07:00
Eliminate if-statement (#3564)
This commit is contained in:
parent
e649ec557b
commit
cc06ef23ff
1 changed files with 1 additions and 9 deletions
|
@ -411,15 +411,7 @@ export default (callback: (launch: (router: VueRouter) => [Vue, MiOS]) => void,
|
|||
|
||||
// Navigation hook
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (os.store.state.navHook) {
|
||||
if (os.store.state.navHook(to)) {
|
||||
next(false);
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
next(os.store.state.navHook && os.store.state.navHook(to) ? false : undefined);
|
||||
});
|
||||
|
||||
document.addEventListener('visibilitychange', () => {
|
||||
|
|
Loading…
Reference in a new issue