Skip to content

Commit 05eb6be

Browse files
committed
Easier to read promise
1 parent c68686a commit 05eb6be

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

client/pages/routes.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,25 @@ export default {
1414
{
1515
path: '/',
1616
getComponent(location, cb) {
17-
System.import('pages/Home').then(loadRoute(cb)).catch(errorLoading);
17+
System.import('pages/Home')
18+
.then(loadRoute(cb))
19+
.catch(errorLoading);
1820
}
1921
},
2022
{
2123
path: 'blog',
2224
getComponent(location, cb) {
23-
System.import('pages/Blog').then(loadRoute(cb)).catch(errorLoading);
25+
System.import('pages/Blog')
26+
.then(loadRoute(cb))
27+
.catch(errorLoading);
2428
}
2529
},
2630
{
2731
path: 'about',
2832
getComponent(location, cb) {
29-
System.import('pages/About').then(loadRoute(cb)).catch(errorLoading);
33+
System.import('pages/About')
34+
.then(loadRoute(cb))
35+
.catch(errorLoading);
3036
}
3137
},
3238
]

0 commit comments

Comments
 (0)