Skip to content

Commit

Permalink
Do not post undefined comments
Browse files Browse the repository at this point in the history
  • Loading branch information
perlpunk committed Nov 19, 2024
1 parent ae34b08 commit fbdcdec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion assets/javascripts/openqa.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ function restartJob(ajaxUrl, jobIds, comment) {
addFlash('danger', errorMessage);
};
const body = new FormData();
body.append('comment', comment);
if (comment !== undefined) {
body.append('comment', comment);

Check failure on line 258 in assets/javascripts/openqa.js

View workflow job for this annotation

GitHub Actions / Lint JavaScript code (using Node version 20)

Delete `··`
}
return fetchWithCSRF(ajaxUrl, {method: 'POST', body: body})
.then(response => {
if (!response.ok) throw `Server returned ${response.status}: ${response.statusText}`;
Expand Down

0 comments on commit fbdcdec

Please sign in to comment.