fix(@desktop): crash on login while getting a setting

This commit is contained in:
Andrei Smirnov 2021-07-27 20:17:46 +03:00 committed by Iuri Matias
parent 15af3ae454
commit c621d5c2ac
1 changed files with 1 additions and 1 deletions

View File

@ -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)