mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-04 01:30:15 +01:00
[Cherry-pick]Convert the string "0" to number 0 (#19082)
Convert the string "0" to number 0 1. Fixes #19046 Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
parent
b2a75dc5f8
commit
c1bb162f14
@ -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