Skip to content

Commit e4095f3

Browse files
committed
Don't redirect on null
1 parent 0962356 commit e4095f3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/components/course-page/course-stage-step/community-solution-card/github-file-actions.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ export default class GithubFileActionsComponent extends Component<Signature> {
6262
} else {
6363
const exportRecord = await this.createExport();
6464

65-
const githubUrl = exportRecord?.githubUrlForFile(this.args.filename);
66-
window.open(githubUrl, '_blank', 'noopener,noreferrer');
65+
if (exportRecord) {
66+
const githubUrl = exportRecord.githubUrlForFile(this.args.filename);
67+
window.open(githubUrl, '_blank', 'noopener,noreferrer');
68+
}
6769
}
6870
}
6971
}

0 commit comments

Comments
 (0)