mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
fix(frontend): Catch config fetch error and set default fallback (#4453)
This commit is contained in:
parent
ad800bf373
commit
678630c5bd
@ -26,8 +26,12 @@ import NewProjectIcon from "#/assets/new-project.svg?react";
|
||||
import DocsIcon from "#/assets/docs.svg?react";
|
||||
|
||||
export const clientLoader = async () => {
|
||||
const config = await OpenHands.getConfig();
|
||||
window.__APP_MODE__ = config.APP_MODE;
|
||||
try {
|
||||
const config = await OpenHands.getConfig();
|
||||
window.__APP_MODE__ = config.APP_MODE;
|
||||
} catch (error) {
|
||||
window.__APP_MODE__ = "oss";
|
||||
}
|
||||
|
||||
let token = localStorage.getItem("token");
|
||||
const ghToken = localStorage.getItem("ghToken");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user