mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-16 20:01:35 +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() {
|
add() {
|
||||||
|
// convert string "0" to number 0
|
||||||
|
if (this.rule.params[this.template] === '0') {
|
||||||
|
this.rule.params[this.template] = 0;
|
||||||
|
}
|
||||||
// remove whitespaces
|
// remove whitespaces
|
||||||
this.rule.scope_selectors.repository[0].pattern =
|
this.rule.scope_selectors.repository[0].pattern =
|
||||||
this.rule.scope_selectors.repository[0].pattern.replace(/\s+/g, '');
|
this.rule.scope_selectors.repository[0].pattern.replace(/\s+/g, '');
|
||||||
|
Loading…
Reference in New Issue
Block a user