diff --git a/package.json b/package.json index 90c9c49b05..a6021928f7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "cadet-frontend", - "version": "1.0.4", + "version": "1.0.5", "scripts-info": { "format": "Format source code", "start": "Start the Webpack development server", diff --git a/src/components/workspace/MCQChooser.tsx b/src/components/workspace/MCQChooser.tsx index 9685cdfcc4..1553683e84 100644 --- a/src/components/workspace/MCQChooser.tsx +++ b/src/components/workspace/MCQChooser.tsx @@ -60,7 +60,7 @@ class MCQChooser extends React.PureComponent { mcqOption: i }) } - const shouldDisplayMessage = this.props.mcq.solution && this.props.mcq.choices[i].hint + const shouldDisplayMessage = this.props.mcq.solution !== null && this.props.mcq.choices[i].hint if (shouldDisplayMessage) { const hintElement = if (i === this.props.mcq.solution) { @@ -86,8 +86,8 @@ class MCQChooser extends React.PureComponent { solution: number | null ): Intent => { const active = currentOption === chosenOption - const correctOptionSelected = active && solution && currentOption === solution - if (!solution) { + const correctOptionSelected = active && solution !== null && currentOption === solution + if (solution === null) { return Intent.NONE } else if (active && correctOptionSelected) { return Intent.SUCCESS diff --git a/src/mocks/assessmentAPI.ts b/src/mocks/assessmentAPI.ts index 753d2d2425..2ae61eb16d 100644 --- a/src/mocks/assessmentAPI.ts +++ b/src/mocks/assessmentAPI.ts @@ -213,7 +213,7 @@ What's your favourite dinner food? id: 2, library: mockCurveLibrary, type: 'mcq', - solution: 2 + solution: 0 }, { answer: 3,