Skip to content

Commit d2bb772

Browse files
committed
tweak name
1 parent 5a12391 commit d2bb772

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/views/News.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
import Spinner from '../components/Spinner.vue'
2727
import NewsItem from '../components/NewsItem.vue'
2828
29-
const fetchData = store => {
29+
const fetchInitialData = store => {
3030
return store
3131
.dispatch(`FETCH_TOP_IDS`)
3232
.then(() => store.dispatch(`FETCH_NEWS`))
3333
}
3434
3535
export default {
3636
name: 'news',
37-
prefetch: fetchData,
37+
prefetch: fetchInitialData,
3838
components: {
3939
Spinner,
4040
NewsItem
@@ -60,7 +60,7 @@ export default {
6060
}
6161
},
6262
mounted () {
63-
fetchData(this.$store)
63+
fetchInitialData(this.$store)
6464
if (this.page > this.maxPage) {
6565
this.$router.push('/')
6666
}

0 commit comments

Comments
 (0)