Skip to content

Commit

Permalink
lib: check for null instead of undefined
Browse files Browse the repository at this point in the history
`exit_status` won't be undefined as it is set to `null` when checked for
undefined for the first time.
  • Loading branch information
tomasmatus committed Nov 12, 2024
1 parent 4e7a000 commit 5e43e5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/lib/cockpit.js
Original file line number Diff line number Diff line change
Expand Up @@ -1407,7 +1407,7 @@ function factory() {
this.message = cockpit.message(options.problem);
else if (this.exit_signal !== null)
this.message = cockpit.format(_("$0 killed with signal $1"), name, this.exit_signal);
else if (this.exit_status !== undefined)
else if (this.exit_status !== null)
this.message = cockpit.format(_("$0 exited with code $1"), name, this.exit_status);
else
this.message = cockpit.format(_("$0 failed"), name);
Expand Down

0 comments on commit 5e43e5b

Please sign in to comment.