فهرست منبع

chore: minor fix

Soham Parekh 3 سال پیش
والد
کامیت
ba4e9caeb5
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      dashboard/src/main/home/cluster-dashboard/expanded-chart/logs-section/useAgentLogs.ts

+ 5 - 0
dashboard/src/main/home/cluster-dashboard/expanded-chart/logs-section/useAgentLogs.ts

@@ -171,6 +171,11 @@ export const useLogs = (
         console.log("Opened websocket:", websocketKey);
         console.log("Opened websocket:", websocketKey);
       },
       },
       onmessage: (evt: MessageEvent) => {
       onmessage: (evt: MessageEvent) => {
+        // Nothing to do here
+        if (!evt?.data || typeof evt.data !== "string") {
+          return
+        }
+        
         const newLogs = parseLogs(
         const newLogs = parseLogs(
           evt?.data?.split("}\n").map((line: string) => line + "}")
           evt?.data?.split("}\n").map((line: string) => line + "}")
         );
         );