diff --git a/framework/core/js/src/forum/states/PostStreamState.js b/framework/core/js/src/forum/states/PostStreamState.js index add0cf5e5..a56132352 100644 --- a/framework/core/js/src/forum/states/PostStreamState.js +++ b/framework/core/js/src/forum/states/PostStreamState.js @@ -282,7 +282,13 @@ class PostStreamState { } }); - return loadIds.length ? app.store.find('posts', loadIds) : Promise.resolve(loaded); + if (loadIds.length) { + return app.store.find('posts', loadIds).then((newPosts) => { + return loaded.concat(newPosts).sort((a, b) => a.id() - b.id()); + }); + } + + return Promise.resolve(loaded); } /**