Skip to content

Commit

Permalink
fix: limit the mapper tab to 200 lines of logs (#1846)
Browse files Browse the repository at this point in the history
Issue #1839
  • Loading branch information
OrKoN authored Feb 12, 2024
1 parent 9526a4a commit 9c60d0a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/bidiTab/mapperTabPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,7 @@ export function log(logPrefix: LogPrefix, ...messages: unknown[]) {
lineElement.className = 'pre';
lineElement.textContent = [logPrefix, ...messages].map(stringify).join(' ');
typeLogContainer.appendChild(lineElement);
if (typeLogContainer.childNodes.length > 200) {
typeLogContainer.removeChild(typeLogContainer.childNodes[0]!);
}
}

0 comments on commit 9c60d0a

Please sign in to comment.