Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: fix crash when location url is /

Abdullah Atta8bd97179302b
diff --git a/apps/web/src/utils/config.ts b/apps/web/src/utils/config.ts
index 85bb8865c..876f431de 100644
--- a/apps/web/src/utils/config.ts
+++ b/apps/web/src/utils/config.ts
@@ -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);
}