Fixed tag edit not rendering example posts
This commit is contained in:
parent
6209cc7833
commit
1e745fa648
1 changed files with 3 additions and 2 deletions
|
@ -19,6 +19,7 @@ App.Presenters.TagPresenter = function(
|
|||
|
||||
var tag;
|
||||
var tagName;
|
||||
var posts;
|
||||
|
||||
var privileges = {};
|
||||
|
||||
|
@ -52,7 +53,7 @@ App.Presenters.TagPresenter = function(
|
|||
api.get('posts', {query: tagName}))
|
||||
.then(function(tagResponse, postsResponse) {
|
||||
tag = tagResponse.json;
|
||||
var posts = postsResponse.json.data;
|
||||
posts = postsResponse.json.data;
|
||||
posts = posts.slice(0, 8);
|
||||
|
||||
render();
|
||||
|
@ -84,7 +85,7 @@ App.Presenters.TagPresenter = function(
|
|||
.then(function(response) {
|
||||
tag = response.json;
|
||||
render();
|
||||
router.navigate('#/tag/' + tag.name);
|
||||
renderPosts(posts);
|
||||
}).fail(function(response) {
|
||||
console.log(response);
|
||||
window.alert('An error occurred');
|
||||
|
|
Loading…
Reference in a new issue