Skip to content

Commit

Permalink
fix: identify Deno as server (#154) (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaellopez committed Apr 22, 2024
1 parent 5363e99 commit 4d6c0d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ export function createEnv<
const client = z.object(_client);
const server = z.object(_server);
const shared = z.object(_shared);
const isServer = opts.isServer ?? typeof window === "undefined";
const isServer =
opts.isServer ?? (typeof window === "undefined" || "Deno" in window);

const allClient = client.merge(shared);
const allServer = server.merge(shared).merge(client);
Expand Down

0 comments on commit 4d6c0d5

Please sign in to comment.