Skip to content

Commit

Permalink
fix(maleo-core/client): parse using flatted instead of json (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
alvinkl committed Jul 24, 2019
1 parent b6ba1d5 commit 29e52a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/Maleo.js/src/client/client.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import Loadable from 'react-loadable';
import { parse } from 'flatted';

import { loadInitialProps, loadComponentProps } from '@routes/loadInitialProps';
import { InitialProps } from '@interfaces/render';
Expand Down Expand Up @@ -86,7 +87,7 @@ export const ensureReady = async (pathname, ctx): Promise<InitialProps['data']>
}

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

// remove initial data after application
// has been hydrated
Expand Down

0 comments on commit 29e52a8

Please sign in to comment.