diff --git a/frontend/src/ts/popups/custom-text-popup.ts b/frontend/src/ts/popups/custom-text-popup.ts index d9597d269..1cf28a1cd 100644 --- a/frontend/src/ts/popups/custom-text-popup.ts +++ b/frontend/src/ts/popups/custom-text-popup.ts @@ -266,7 +266,8 @@ function apply(): void { } } - CustomText.setText(text.split(CustomText.delimiter)); + const words = text.split(CustomText.delimiter).filter((word) => word !== ""); + CustomText.setText(words); CustomText.setWord( parseInt(($(`${popup} .wordcount input`).val() as string) || "-1")