From 4a1b402e62c962e55c7d96011620e86f1889106e Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 29 Sep 2021 22:42:07 +0200 Subject: [PATCH] fix: quick add magic always disabled --- src/helpers/quickAddMagicMode.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/helpers/quickAddMagicMode.ts b/src/helpers/quickAddMagicMode.ts index 41769ebe..2862953f 100644 --- a/src/helpers/quickAddMagicMode.ts +++ b/src/helpers/quickAddMagicMode.ts @@ -9,6 +9,12 @@ export const setQuickAddMagicMode = (mode: PrefixMode) => { export const getQuickAddMagicMode = (): PrefixMode => { const mode = localStorage.getItem(key) - // @ts-ignore - return PrefixMode[mode] || PrefixMode.Disabled + switch (mode) { + case PrefixMode.Default: + return PrefixMode.Default + case PrefixMode.Todoist: + return PrefixMode.Todoist + } + + return PrefixMode.Disabled }