mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-09-04 14:36:54 +08:00
refactor: init switching to nextjs router
This commit is contained in:
@@ -3,7 +3,12 @@ import { BuildConfig, getBuildConfig } from "./build";
|
||||
export function getClientConfig() {
|
||||
if (typeof document !== "undefined") {
|
||||
// client side
|
||||
return JSON.parse(queryMeta("config")) as BuildConfig;
|
||||
try {
|
||||
const config = JSON.parse(queryMeta("config")) as BuildConfig;
|
||||
return config;
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof process !== "undefined") {
|
||||
|
Reference in New Issue
Block a user