diff options
author | Noah Loomans <noahloomans@gmail.com> | 2018-07-06 21:10:28 +0200 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2018-07-06 21:10:28 +0200 |
commit | 51e214aec1ec9137432233cddbe5e294bf74ca23 (patch) | |
tree | fafe5a9b15b2283344a4ef206e21e3e3914cf8f3 /src/client | |
parent | d93de2fd07bdf9b3151e94b9b7902bc3cda565d0 (diff) |
statusCode might not exist
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/react/components/presentational/ScheduleErrorDisplay.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/react/components/presentational/ScheduleErrorDisplay.js b/src/client/react/components/presentational/ScheduleErrorDisplay.js index 59d1f69..5072b4b 100644 --- a/src/client/react/components/presentational/ScheduleErrorDisplay.js +++ b/src/client/react/components/presentational/ScheduleErrorDisplay.js @@ -24,12 +24,17 @@ import './ScheduleErrorDisplay.scss'; class ScheduleErrorDisplay extends React.Component { static propTypes = { - statusCode: PropTypes.string.isRequired, + statusCode: PropTypes.string, }; + static defaultProps = { + statusCode: null, + } + render() { const { statusCode } = this.props; const errorMessage = ( + // statusCode might be null! statusCode === 404 ? 'Sorry, er is (nog) geen rooster voor deze week.' : 'Sorry, er is iets mis gegaan tijdens het laden van deze week.' |