mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-24 04:00:59 +01:00
web: fix crash when location url is /
This commit is contained in:
@@ -25,7 +25,7 @@ function set<T>(key: string, value: T) {
|
||||
|
||||
function get<T>(key: string, def?: T): T {
|
||||
const value = window.localStorage.getItem(key);
|
||||
if (!value && def) return def;
|
||||
if (!value && def !== undefined) return def;
|
||||
|
||||
return tryParse(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user