mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
fix: vercel env
This commit is contained in:
parent
b498b67ea3
commit
9854df5199
@ -1,12 +1,8 @@
|
||||
import { env } from "next-runtime-env";
|
||||
|
||||
export default function getEnv(key: string) {
|
||||
if (process.env.VERCEL) {
|
||||
return process.env[key];
|
||||
} else {
|
||||
if (key.startsWith("NEXT_PUBLIC_")) {
|
||||
return env(key);
|
||||
}
|
||||
return process.env[key];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user