mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 02:05:41 +01:00
Convert the string "0" to number 0 (#19080)
1. Fixes #19046 Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
parent
d34775296c
commit
530b78285b
@ -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, '');
|
||||
|
Loading…
Reference in New Issue
Block a user