diff --git a/src/components/ChallengeEditor/Submissions/index.js b/src/components/ChallengeEditor/Submissions/index.js index 1a563f49..44f5f318 100644 --- a/src/components/ChallengeEditor/Submissions/index.js +++ b/src/components/ChallengeEditor/Submissions/index.js @@ -515,7 +515,12 @@ class SubmissionsComponent extends React.Component { const url = window.URL.createObjectURL(new Blob([blob])) const link = document.createElement('a') link.href = url - link.setAttribute('download', `${s.legacySubmissionId}.zip`) + let fileName = s.legacySubmissionId + if (!fileName) { + fileName = s.id + } + fileName = fileName + '.zip' + link.setAttribute('download', `${fileName}`) document.body.appendChild(link) link.click() link.parentNode.removeChild(link)