Skip to content

Commit

Permalink
Fix weatheralerts: "Special Weather" Alert Type Not Found (#217)
Browse files Browse the repository at this point in the history
Co-authored-by: Bartosz Dokurno <[email protected]>
  • Loading branch information
shaulbd and MrBartusek authored Oct 12, 2023
1 parent 32d5d79 commit fcd2b78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/integrations/weatheralerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ export default class Weatheralerts implements MeteoalarmIntegration {
alertLevel = level;
const alertName = fullAlertName.replace(levelName, '').trim();
alertType = this.eventTypes[alertName];
if(!alertType) {
if(alertType == undefined) {
throw Error(`Unknown weatheralerts alert type: ${alertName}`);
}
}

if(!alertLevel) {
if(alertLevel == undefined) {
throw Error(`Unknown weatheralerts alert level: ${fullAlertName}`);
}

Expand Down

0 comments on commit fcd2b78

Please sign in to comment.