Skip to content

Commit

Permalink
Convert the string "0" to number 0
Browse files Browse the repository at this point in the history
1. Fixes #19046

Signed-off-by: AllForNothing <sshijun@vmware.com>
  • Loading branch information
AllForNothing committed Aug 2, 2023
1 parent e767fe2 commit 91ff15a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@ export class AddRuleComponent {
}

add() {
// convert string "0" to number 0
if (this.rule.params[this.template] === '0') {
this.rule.params[this.template] = 0;
}
// remove whitespaces
this.rule.scope_selectors.repository[0].pattern =
this.rule.scope_selectors.repository[0].pattern.replace(/\s+/g, '');
Expand Down

0 comments on commit 91ff15a

Please sign in to comment.