fix: quick add magic always disabled

This commit is contained in:
kolaente 2021-09-29 22:42:07 +02:00
parent e20be7b788
commit 4a1b402e62
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -9,6 +9,12 @@ export const setQuickAddMagicMode = (mode: PrefixMode) => {
export const getQuickAddMagicMode = (): PrefixMode => { export const getQuickAddMagicMode = (): PrefixMode => {
const mode = localStorage.getItem(key) const mode = localStorage.getItem(key)
// @ts-ignore switch (mode) {
return PrefixMode[mode] || PrefixMode.Disabled case PrefixMode.Default:
return PrefixMode.Default
case PrefixMode.Todoist:
return PrefixMode.Todoist
}
return PrefixMode.Disabled
} }