mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-27 10:42:45 +03:00
Fixed adding comments order
This commit is contained in:
parent
fdeed0eeec
commit
5841241a42
@ -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…
Reference in New Issue
Block a user