Skip to content

Commit

Permalink
chore(app): validate node env on link constructor lib
Browse files Browse the repository at this point in the history
  • Loading branch information
GeovannyGil committed Sep 26, 2024
1 parent 31a1568 commit 8449e37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/app/src/lib/link-constructor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export function linkConstructor({
let url = "";
if (process.env.NODE_ENV === "development") {
url = `http://localhost:3000${key && key !== "_root" ? `/${key}` : ""}`;
} else {
}

if (process.env.NODE_ENV === "production") {
url = `https://${punycode(domain)}${key && key !== "_root" ? `/${punycode(key)}` : ""}`;
}

Expand Down

0 comments on commit 8449e37

Please sign in to comment.