refactor: introduced helper method to remove redundant code
This commit is contained in:
1 parent
d2c13fac5a
commit
f637b01631
3 files changed
+74
-84
No files matched your search
@@ -186,7 +186,7 @@ export class NotificationMessageBuilder implements INotificationMessageBuilder {
|
||||
const breaches: ThresholdBreach[] = [];
|
||||
|
||||
// Check if this is a hardware monitor with threshold data
|
||||
if (monitor.type !== "hardware" || !monitorStatusResponse.payload) {
|
||||
if (monitor.type !== "hardware" || !monitorStatusResponse.payload || typeof monitorStatusResponse.payload === "string") {
|
||||
return breaches;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user