mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-27 01:06:21 +08:00
fix(custom text): not being able to delete custom text if content is empty
part of #4904
This commit is contained in:
parent
84fe80bbc1
commit
eba4b92305
1 changed files with 1 additions and 1 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue