Skip to content

Commit f3c667d

Browse files
Julien-serCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 93b3940 commit f3c667d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

client/src/components/ConsoleTab.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ const ConsoleTab = ({
2626
const allLogEntries = serverLogs.filter(
2727
(n) => n.method === "notifications/message",
2828
);
29+
30+
useEffect(() => {
31+
setClearedCount((currentClearedCount) =>
32+
Math.min(currentClearedCount, allLogEntries.length),
33+
);
34+
}, [allLogEntries.length]);
35+
2936
const logEntries = allLogEntries.slice(clearedCount);
3037

3138
useEffect(() => {

0 commit comments

Comments
 (0)