diff --git a/src/shared/components/post/post-listings.tsx b/src/shared/components/post/post-listings.tsx index 1baab205..098a015d 100644 --- a/src/shared/components/post/post-listings.tsx +++ b/src/shared/components/post/post-listings.tsx @@ -115,7 +115,7 @@ export class PostListings extends Component { removeDuplicates(): PostView[] { // Must use a spread to clone the props, because splice will fail below otherwise. - const posts = [...this.props.posts]; + const posts = [...this.props.posts].filter(empty => empty); // A map from post url to list of posts (dupes) const urlMap = new Map(); diff --git a/src/shared/utils.ts b/src/shared/utils.ts index fafaf5e9..46e8601b 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -1274,7 +1274,7 @@ export function initializeSite(site?: GetSiteResponse) { UserService.Instance.myUserInfo = site?.my_user; i18n.changeLanguage(getLanguages()[0]); if (site) { - setupEmojiDataModel(site.custom_emojis); + setupEmojiDataModel(site.custom_emojis ?? []); } setupMarkdown(); }