Skip to content

Commit ab39870

Browse files
Avoid calling next more than once when navigating from / to /errata (#588)
Fixes: AlmaLinux/build-system#430
1 parent e4e2501 commit ab39870

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/router/routes.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,10 @@ const routes = [
2727
name: 'BuildFeed',
2828
component: () => import('pages/BuildFeed.vue'),
2929
beforeEnter(to, from, next) {
30-
store.dispatch('users/loadUsersList').then(next()).catch(next())
31-
store
32-
.dispatch('platforms/loadPlatformList')
33-
.then(next())
34-
.catch(next())
30+
Promise.all([
31+
store.dispatch('users/loadUsersList'),
32+
store.dispatch('platforms/loadPlatformList'),
33+
]).finally(next)
3534
},
3635
children: [
3736
{
@@ -98,10 +97,7 @@ const routes = [
9897
path: 'errata',
9998
component: () => import('pages/ErrataFeed.vue'),
10099
beforeEnter(to, from, next) {
101-
store
102-
.dispatch('platforms/loadPlatformList')
103-
.then(next())
104-
.catch(next())
100+
store.dispatch('platforms/loadPlatformList').then(next)
105101
},
106102
},
107103
{

0 commit comments

Comments
 (0)