diff --git a/frontend/src/ts/popups/save-custom-text-popup.ts b/frontend/src/ts/popups/save-custom-text-popup.ts index 9e133aec8..63928ee3d 100644 --- a/frontend/src/ts/popups/save-custom-text-popup.ts +++ b/frontend/src/ts/popups/save-custom-text-popup.ts @@ -75,6 +75,11 @@ function save(): boolean { return false; } + if (text.length === 0) { + Notifications.add("Custom text can't be empty", 0); + return false; + } + text = text.replace(/( *(\r\n|\r|\n) *)/g, "\n "); CustomText.setCustomText(name, text, checkbox);