fix(custom text): not being able to delete custom text if content is empty

part of #4904
This commit is contained in:
Miodec 2024-01-10 17:35:39 +01:00
parent 84fe80bbc1
commit eba4b92305

View file

@ -110,7 +110,7 @@ export function setCustomText(
export function deleteCustomText(name: string, long = false): void {
const customText = long ? getCustomTextLongObject() : getCustomTextObject();
if (customText[name]) delete customText[name];
if (customText[name] != undefined) delete customText[name];
if (long) {
window.localStorage.setItem("customTextLong", JSON.stringify(customText));