refactor: introduced helper method to remove redundant code

This commit is contained in:
harsh-aghara committed 2026-06-08 17:30:26 +05:30
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;
}