Fixing the elusive missing post bug

Этот коммит содержится в:
JoramWilander
2016-02-11 09:22:57 -05:00
родитель a15f8c582d
Коммит cac086ae22
2 изменённых файлов: 4 добавлений и 19 удалений

Просмотреть файл

@@ -521,18 +521,18 @@ export function getPosts(id) {
return;
}
if (PostStore.getAllPosts(channelId) == null) {
if ($.isEmptyObject(PostStore.getAllPosts(channelId))) {
getPostsPage(channelId, Constants.POST_CHUNK_SIZE);
return;
}
const latestUpdate = PostStore.getLatestUpdate(channelId);
const latestPost = PostStore.getLatestPost(channelId);
callTracker['getPosts_' + channelId] = utils.getTimestamp();
client.getPosts(
channelId,
latestUpdate,
latestPost.update_at,
(data, textStatus, xhr) => {
if (xhr.status === 304 || !data) {
return;