diff options
author | Sorin Davidoi <sorin.davidoi@gmail.com> | 2017-07-11 01:00:14 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-07-11 01:00:14 +0200 |
commit | cc68d1945b42459a787e0ce216e8f49393eeb197 (patch) | |
tree | 1c01481aa4dec6b60bafb15e119c36498d5a1d27 /app/javascript/mastodon/actions/store.js | |
parent | 7bacdd718a143f54f47ddc3afa39504636be65c0 (diff) |
refactor: Rewrite immutablejs import statements using destructuring (#4147)
Diffstat (limited to 'app/javascript/mastodon/actions/store.js')
-rw-r--r-- | app/javascript/mastodon/actions/store.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/mastodon/actions/store.js b/app/javascript/mastodon/actions/store.js index efdb0771a..0597d265e 100644 --- a/app/javascript/mastodon/actions/store.js +++ b/app/javascript/mastodon/actions/store.js @@ -1,11 +1,11 @@ -import Immutable from 'immutable'; +import { Iterable, fromJS } from 'immutable'; export const STORE_HYDRATE = 'STORE_HYDRATE'; export const STORE_HYDRATE_LAZY = 'STORE_HYDRATE_LAZY'; const convertState = rawState => - Immutable.fromJS(rawState, (k, v) => - Immutable.Iterable.isIndexed(v) ? v.toList() : v.toMap().mapKeys(x => + fromJS(rawState, (k, v) => + Iterable.isIndexed(v) ? v.toList() : v.toMap().mapKeys(x => Number.isNaN(x * 1) ? x : x * 1)); export function hydrateStore(rawState) { |