From ca757b20d56c466d03d1c0185f54e5dbec7e6f47 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Wed, 5 Mar 2025 22:16:31 +0200 Subject: [PATCH] fix(note_language): duplicate separators if no language selected --- src/public/app/widgets/note_language.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/public/app/widgets/note_language.ts b/src/public/app/widgets/note_language.ts index f0243c5f3..2b57d1c9f 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; }