mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Fixed adding comments order
This commit is contained in:
parent
fdeed0eeec
commit
5841241a42
2 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ async function addComment({state, api, data: comment}) {
|
|||
};
|
||||
|
||||
return {
|
||||
comments: [...state.comments, commentStructured]
|
||||
comments: [commentStructured, ...state.comments]
|
||||
// todo: fix pagination now?
|
||||
};
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ function setupGhostApi({siteUrl = window.location.origin, apiUrl, apiKey}) {
|
|||
credentials: 'same-origin'
|
||||
}).then(function (res) {
|
||||
if (res.ok) {
|
||||
return res.json()
|
||||
return res.json();
|
||||
} else {
|
||||
throw new Error('Failed to fetch comments');
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue