[go: nahoru, domu]

Skip to content

Commit

Permalink
[Cherry-pick]Convert the string "0" to number 0 (#19081)
Browse files Browse the repository at this point in the history
Convert the string "0" to number 0
1. Fixes #19046

Signed-off-by: AllForNothing <sshijun@vmware.com>
  • Loading branch information
AllForNothing committed Aug 3, 2023
1 parent f69171f commit dd54646
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 dd54646

Please sign in to comment.