fix(@desktop): crash on login while getting a setting
This commit is contained in:
parent
15af3ae454
commit
c621d5c2ac
|
@ -59,7 +59,7 @@ proc getSetting*[T](name: Setting, defaultValue: T, useCached: bool = true): T =
|
||||||
result = Json.decode(value, T)
|
result = Json.decode(value, T)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
error "Error decoding setting", name=name, value=value, msg=e.msg
|
error "Error decoding setting", name=name, value=value, msg=e.msg
|
||||||
raise e
|
return defaultValue
|
||||||
|
|
||||||
proc getSetting*[T](name: Setting, useCached: bool = true): T =
|
proc getSetting*[T](name: Setting, useCached: bool = true): T =
|
||||||
result = getSetting(name, default(type(T)), useCached)
|
result = getSetting(name, default(type(T)), useCached)
|
||||||
|
|
Loading…
Reference in New Issue