use fetch, tidy up

This commit is contained in:
Rich Harris
2018-03-18 22:38:14 -04:00
parent 06e24b3eed
commit 8887791e72
3 changed files with 4 additions and 14 deletions

View File

@@ -32,7 +32,7 @@
},
preload({ params, query }) {
return fetch(`blog.json`).then(r => r.json()).then(posts => {
return this.fetch(`blog.json`).then(r => r.json()).then(posts => {
return { posts };
});
}