Fix alert frequency check (#32974)

This commit is contained in:
Dimitris Sotirakis
2021-04-14 11:47:30 +02:00
committed by GitHub
parent 3b6117a268
commit 52243d859b
+5 -1
View File
@@ -266,7 +266,11 @@ export class AlertTabCtrl {
checkFrequency() {
this.frequencyWarning = '';
if (!(this.alert.frequency || '').match(/^\d+([dhms])$/)) {
if (!this.alert.frequency) {
return;
}
if (!this.alert.frequency.match(/^\d+([dhms])$/)) {
this.frequencyWarning =
'Invalid frequency, has to be numeric followed by one of the following units: "d, h, m, s"';
return;