Skip importing empty accounts, fixes #424
This commit is contained in:
parent
c2ae225db1
commit
556e11a9cb
2 changed files with 7 additions and 2 deletions
|
@ -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');
|
||||
|
||||
|
|
|
@ -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 => {
|
||||
|
|
Loading…
Reference in a new issue