From c6b81ec13534798a24cd28e3fda099341a5d0dc0 Mon Sep 17 00:00:00 2001 From: Hexagonn <128217934+hexaaagon@users.noreply.github.com> Date: Tue, 22 Oct 2024 09:07:52 +0000 Subject: [PATCH] fix(front): add `||` to every `window` object --- src/app/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index e84256a..a40ef95 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -32,9 +32,9 @@ export default function Home() { const outputText = () => { if (outputType === "html") { - return ``; + return ``; } else { - return `[![Discord Presence](${window.location.origin}/api/${userData?.userId})](https://discord.com/users/${userData?.userId})`; + return `[![Discord Presence](${window?.location?.origin || "https://lanyard.cnrad.dev"}/api/${userData?.userId})](https://discord.com/users/${userData?.userId})`; } }; const copy = () => {