From fd4afe9fbcd6565ae8d89a2cf30ed11d9bb3a4c3 Mon Sep 17 00:00:00 2001 From: Bauke Date: Thu, 23 Nov 2023 13:06:10 +0100 Subject: [PATCH] Log the count only when more than 0 toolbars are added. --- source/content-scripts/features/markdown-toolbar.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/content-scripts/features/markdown-toolbar.tsx b/source/content-scripts/features/markdown-toolbar.tsx index 1820a0b..a41c44c 100644 --- a/source/content-scripts/features/markdown-toolbar.tsx +++ b/source/content-scripts/features/markdown-toolbar.tsx @@ -10,7 +10,9 @@ export function runMarkdownToolbarFeature( snippets: Array>, ) { const count = addToolbarsToTextareas(snippets); - log(`Markdown Toolbar: Initialized for ${count} textareas.`); + if (count > 0) { + log(`Markdown Toolbar: Initialized for ${count} textareas.`); + } } function addToolbarsToTextareas(