Skip to content

Commit

Permalink
cleaned up message code
Browse files Browse the repository at this point in the history
Signed-off-by: Amndeep Singh Mann <[email protected]>
  • Loading branch information
Amndeep7 committed Jul 30, 2024
1 parent 921b62d commit b60ba86
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,9 @@ export default class ControlRowCol extends mixins(HtmlSanitizeMixin) {
// Check if either `skip_message` or `message` exist
// If one but not the other exists, display the individual message
// Otherwise display both messages in a joint string
if (this.result.skip_message) {
return this.result.message
? `-Message-\n${this.result.message}\n\n-Skip Message-\n${this.result.skip_message}`
: this.result.skip_message;
} else {
return this.result.message;
}
return this.result.skip_message && this.result.message
? `-Message-\n${this.result.message}\n\n-Skip Message-\n${this.result.skip_message}`
: this.result.message || this.result.skip_message;
}
}
</script>
Expand Down

0 comments on commit b60ba86

Please sign in to comment.