Soham Parekh 3 лет назад
Родитель
Сommit
ba4e9caeb5

+ 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);
       },
       onmessage: (evt: MessageEvent) => {
+        // Nothing to do here
+        if (!evt?.data || typeof evt.data !== "string") {
+          return
+        }
+        
         const newLogs = parseLogs(
           evt?.data?.split("}\n").map((line: string) => line + "}")
         );