Skip to content

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

desktop: fix crash on toggling custom dns (#5538)

Abdullah Attad605bc29bf1d
diff --git a/apps/desktop/src/api/os-integration.ts b/apps/desktop/src/api/os-integration.ts
index 768f124ad..ac760e39a 100644
--- a/apps/desktop/src/api/os-integration.ts
+++ b/apps/desktop/src/api/os-integration.ts
@@ -58,11 +58,11 @@ export const osIntegrationRouter = t.router({
customDns: t.procedure.query(() => config.customDns),
setCustomDns: t.procedure
- .input(z.boolean())
+ .input(z.boolean().optional())
.mutation(({ input: customDns }) => {
if (customDns) enableCustomDns();
else disableCustomDns();
- config.customDns = customDns;
+ config.customDns = !!customDns;
}),
proxyRules: t.procedure.query(() => config.proxyRules),