Skip to content

Build your personal knowledge base with Trilium Notes

fix(note_language): duplicate separators if no language selected

Elian Doranca757b20d56c
diff --git a/src/public/app/widgets/note_language.ts b/src/public/app/widgets/note_language.ts
index f0243c5f3f..2b57d1c9f1 100644
--- a/src/public/app/widgets/note_language.ts
+++ b/src/public/app/widgets/note_language.ts
@@ -152,7 +152,11 @@ export default class NoteLanguageWidget extends NoteContextAwareWidget {
];
}
- locales.push("---"); // this will separate the list of languages from the "Configure languages" button.
+ // This will separate the list of languages from the "Configure languages" button.
+ // If there is at least one language.
+ if (locales.length > 2) {
+ locales.push("---");
+ }
return locales;
}