Rebase with cleaning up fetchingEvents actions

This commit is contained in:
Franc Camps-Febrer
2018-12-07 09:06:47 +00:00
parent aeec3ee239
commit ccd917f73b
5 changed files with 33 additions and 33 deletions

View File

@@ -26,7 +26,7 @@ class NarrativeCard extends React.Component {
componentDidUpdate() {
if (this.props.narrative !== null) {
const step = this.props.narrative.steps[this.state.step];
this.props.onSelect([step.id]);
this.props.onSelect([step]);
}
}
@@ -42,7 +42,7 @@ class NarrativeCard extends React.Component {
}
render() {
if (this.props.narrative !== null) {
if (this.props.narrative !== null && this.props.narrative.steps[this.state.step]) {
const steps = this.props.narrative.steps;
const step = steps[this.state.step];