Skip to content

Commit

Permalink
fix(redux-plugin): change json parse to flatted parse (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
alvinkl authored Jul 24, 2019
1 parent cf4df65 commit ea258e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/redux-plugin/src/withRedux.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { Provider } from 'react-redux';
import { parse } from 'flatted';
import hoistStatics from 'hoist-non-react-statics';

import { STORE_KEY } from './const';
Expand Down Expand Up @@ -42,7 +43,7 @@ export const withRedux = (makeStoreClient) => {

if (initialState) {
const { textContent } = initialState;
data = JSON.parse(textContent || '');
data = parse(textContent || '');

// remove element after hydrate
initialState.remove();
Expand Down

0 comments on commit ea258e7

Please sign in to comment.