Merge branch '424-hotfix' into 'develop'

Skip importing empty accounts, fixes #424

Closes #424

See merge request soapbox-pub/soapbox-fe!236
better-alerts
Alex Gleason 2020-09-15 16:00:09 +00:00
commit 9a6fef568f
2 zmienionych plików z 7 dodań i 2 usunięć

Wyświetl plik

@ -46,6 +46,8 @@ export function importFetchedAccounts(accounts) {
const normalAccounts = [];
function processAccount(account) {
if (!account.id) return;
pushUnique(normalAccounts, normalizeAccount(account));
if (account.moved) {
@ -69,6 +71,8 @@ export function importFetchedStatuses(statuses) {
const polls = [];
function processStatus(status) {
if (!status.account.id) return;
const normalOldStatus = getState().getIn(['statuses', status.id]);
const expandSpoilers = getSettings(getState()).get('expandSpoilers');

Wyświetl plik

@ -61,8 +61,9 @@ const normalizeNotification = (state, notification) => {
const expandNormalizedNotifications = (state, notifications, next) => {
let items = ImmutableList();
notifications.forEach((n, i) => {
items = items.set(i, notificationToMap(n));
notifications.forEach((n) => {
if (!n.account.id) return;
items = items.push(notificationToMap(n));
});
return state.withMutations(mutable => {