Skip to content

Commit 811a5b2

Browse files
bivanalharcysjonathan
authored andcommitted
fix(answerView): programming answer shown as too big when empty
1 parent d434107 commit 811a5b2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

client/app/bundles/course/assessment/pages/AssessmentStatistics/AnswerDetails/ProgrammingComponent/FileContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const FileContent: FC<Props> = (props) => {
2525
const { answerId, annotations, file } = props;
2626
const fileAnnotation = annotations.find((a) => a.fileId === file.id);
2727

28-
return file.highlightedContent ? (
28+
return file.highlightedContent !== null ? (
2929
<ReadOnlyEditor
3030
annotations={fileAnnotation?.topics ?? ([] as AnnotationTopic[])}
3131
answerId={answerId}

client/app/bundles/course/assessment/submission/containers/ReadOnlyEditor.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ReadOnlyEditorContainer extends Component {
2424
render() {
2525
const { answerId, file, annotations } = this.props;
2626

27-
if (file.highlightedContent) {
27+
if (file.highlightedContent !== null) {
2828
return (
2929
<ReadOnlyEditorComponent
3030
annotations={Object.values(annotations)}

0 commit comments

Comments
 (0)