diff --git a/app/soapbox/reducers/accounts.js b/app/soapbox/reducers/accounts.js index c601ed928..de7926feb 100644 --- a/app/soapbox/reducers/accounts.js +++ b/app/soapbox/reducers/accounts.js @@ -46,7 +46,7 @@ const minifyAccount = account => { }; const fixAccount = (state, account) => { - const normalized = minifyAccount(normalizeAccount(fromJS(account))); + const normalized = minifyAccount(normalizeAccount(account)); return state.set(account.id, normalized); }; @@ -119,7 +119,7 @@ const removePermission = (state, accountIds, permissionGroup) => { }); }; -const buildAccount = adminUser => normalizeAccount(fromJS({ +const buildAccount = adminUser => normalizeAccount({ id: adminUser.get('id'), username: adminUser.get('nickname').split('@')[0], acct: adminUser.get('nickname'), @@ -142,7 +142,7 @@ const buildAccount = adminUser => normalizeAccount(fromJS({ }, }, should_refetch: true, -})); +}); const mergeAdminUser = (account, adminUser) => { return account.withMutations(account => { diff --git a/app/soapbox/reducers/polls.js b/app/soapbox/reducers/polls.js index f1a06fdc1..f9f220edc 100644 --- a/app/soapbox/reducers/polls.js +++ b/app/soapbox/reducers/polls.js @@ -1,4 +1,4 @@ -import { Map as ImmutableMap, fromJS } from 'immutable'; +import { Map as ImmutableMap } from 'immutable'; import { POLLS_IMPORT } from 'soapbox/actions/importer'; import { normalizeStatus } from 'soapbox/normalizers/status'; @@ -6,7 +6,7 @@ import { normalizeStatus } from 'soapbox/normalizers/status'; // HOTFIX: Convert the poll into a fake status to normalize it... // TODO: get rid of POLLS_IMPORT and use STATUS_IMPORT here. const normalizePoll = poll => { - const status = fromJS({ poll }); + const status = { poll }; return normalizeStatus(status).poll; };