Merge branch '424-hotfix' into 'develop'
Skip importing empty accounts, fixes #424 Closes #424 See merge request soapbox-pub/soapbox-fe!236
This commit is contained in:
commit
9a6fef568f
|
@ -46,6 +46,8 @@ export function importFetchedAccounts(accounts) {
|
||||||
const normalAccounts = [];
|
const normalAccounts = [];
|
||||||
|
|
||||||
function processAccount(account) {
|
function processAccount(account) {
|
||||||
|
if (!account.id) return;
|
||||||
|
|
||||||
pushUnique(normalAccounts, normalizeAccount(account));
|
pushUnique(normalAccounts, normalizeAccount(account));
|
||||||
|
|
||||||
if (account.moved) {
|
if (account.moved) {
|
||||||
|
@ -69,6 +71,8 @@ export function importFetchedStatuses(statuses) {
|
||||||
const polls = [];
|
const polls = [];
|
||||||
|
|
||||||
function processStatus(status) {
|
function processStatus(status) {
|
||||||
|
if (!status.account.id) return;
|
||||||
|
|
||||||
const normalOldStatus = getState().getIn(['statuses', status.id]);
|
const normalOldStatus = getState().getIn(['statuses', status.id]);
|
||||||
const expandSpoilers = getSettings(getState()).get('expandSpoilers');
|
const expandSpoilers = getSettings(getState()).get('expandSpoilers');
|
||||||
|
|
||||||
|
|
|
@ -61,8 +61,9 @@ const normalizeNotification = (state, notification) => {
|
||||||
const expandNormalizedNotifications = (state, notifications, next) => {
|
const expandNormalizedNotifications = (state, notifications, next) => {
|
||||||
let items = ImmutableList();
|
let items = ImmutableList();
|
||||||
|
|
||||||
notifications.forEach((n, i) => {
|
notifications.forEach((n) => {
|
||||||
items = items.set(i, notificationToMap(n));
|
if (!n.account.id) return;
|
||||||
|
items = items.push(notificationToMap(n));
|
||||||
});
|
});
|
||||||
|
|
||||||
return state.withMutations(mutable => {
|
return state.withMutations(mutable => {
|
||||||
|
|
Loading…
Reference in New Issue