Skip to content

Commit

Permalink
fix(uploader) : Don't include null in files array
Browse files Browse the repository at this point in the history
better prevent than cure ^^
  • Loading branch information
jy95 authored Jan 18, 2020
1 parent f953c12 commit f916b4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion commands/uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ async function send_to_API(argv, results) {
file: exercise.file
}))
.filter(exercise => exercise.has_file === true)
.filter(exercise => exercise.file !== null)
.map(exercise => ({
filename: path.basename(exercise.file),
exercise: exercise.index,
Expand Down Expand Up @@ -230,4 +231,4 @@ function handle_request_status(response) {
throw new BetterError(response.request.url, response.status,response.body.message)
}
}
}
}

0 comments on commit f916b4e

Please sign in to comment.