Skip to content

Commit

Permalink
#58 bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mjrerle2 committed Jan 10, 2019
1 parent 554f9ab commit 5f9860f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ class App extends Component {
endTime: Date.now(),
}}
render={({ error, props }) => {
console.log(props);
if (error) {
return <div>{error.message}</div>;
} else if (props && typeof props !== 'undefined') {
return <Map trynState={props} />;
}
return <Map trynState={props || null} />;
}}
return <div>Loading...</div>;
}
}
/>
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/Map.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 5f9860f

Please sign in to comment.