From ddd122b87bfc8aac15cbd8dfbf777bf4b8ef86ea Mon Sep 17 00:00:00 2001 From: Rohland de Charmoy Date: Mon, 27 Nov 2023 10:19:05 +0200 Subject: [PATCH] :recycle: refactoring --- package.json | 2 +- src/models/alert_configuration.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 64d2042..19802f3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "barky", - "version": "1.1.6", + "version": "1.1.7", "description": "A simple cloud services watchdog with digest notification support & no external dependencies", "homepage": "https://github.com/Rohland/barky#readme", "main": "dist/cli.js", diff --git a/src/models/alert_configuration.ts b/src/models/alert_configuration.ts index d049bf5..b8deec0 100644 --- a/src/models/alert_configuration.ts +++ b/src/models/alert_configuration.ts @@ -131,6 +131,6 @@ export class AlertConfiguration { if (noDirectlyMatchedRules) { return this.rules.find(x => !x.match && x.isValidNow(date)) ?? null; } - return rules.find(x => !x.isNotValidNow) ?? null; + return rules.find(x => x.isValidNow(date)) ?? null; } }