From 5f9860fe5c757bad1f084af6c0aee75043d9303c Mon Sep 17 00:00:00 2001 From: merle Date: Wed, 9 Jan 2019 19:54:05 -0800 Subject: [PATCH] #58 bug fix --- src/App.jsx | 8 ++++++-- src/Map.jsx | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index f8a3fcd..3bf185b 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -42,11 +42,15 @@ class App extends Component { endTime: Date.now(), }} render={({ error, props }) => { + console.log(props); if (error) { return
{error.message}
; + } else if (props && typeof props !== 'undefined') { + return ; } - return ; - }} + return
Loading...
; + } + } /> ); } diff --git a/src/Map.jsx b/src/Map.jsx index b9dec50..864cf33 100644 --- a/src/Map.jsx +++ b/src/Map.jsx @@ -246,10 +246,10 @@ class Map extends Component { } Map.propTypes = { - trynState: propTypes.shape( + trynState: propTypes.shape([ propTypes.string, propTypes.arrayOf(propTypes.object), - ).isRequired, + ]).isRequired, }; export default createRefetchContainer(