Fix SingleInterview indexing

This commit is contained in:
Wisani Shilumani 2018-07-13 11:55:26 +02:00
parent 5e815e4bad
commit 20f54315e6

View File

@ -13,7 +13,7 @@ const SingleInterview = props => (
<span className="name"> { props.selectedInterview.name } </span>
{ props.selectedInterview.interview.filter(interview => interview.answer !== null)
.map((interview, index) => {
const question = props.questions[interview.question];
const question = props.questions.find(q => q.id === interview.question);
return (
<div key={`question-${question.id}`}>