1
Fork 0

Log the count only when more than 0 toolbars are added.

This commit is contained in:
Bauke 2023-11-23 13:06:10 +01:00
parent 223dfa2658
commit fd4afe9fbc
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 3 additions and 1 deletions

View File

@ -10,8 +10,10 @@ export function runMarkdownToolbarFeature(
snippets: Array<Value<MarkdownSnippet>>, snippets: Array<Value<MarkdownSnippet>>,
) { ) {
const count = addToolbarsToTextareas(snippets); const count = addToolbarsToTextareas(snippets);
if (count > 0) {
log(`Markdown Toolbar: Initialized for ${count} textareas.`); log(`Markdown Toolbar: Initialized for ${count} textareas.`);
} }
}
function addToolbarsToTextareas( function addToolbarsToTextareas(
snippets: Array<Value<MarkdownSnippet>>, snippets: Array<Value<MarkdownSnippet>>,