Skip to content

Commit 6627f7c

Browse files
committed
build: allow app to start without config.json in dev versions
1 parent 9c7d887 commit 6627f7c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/bootstrap-environment.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ export async function initEnvironmentConfig() {
1616
throw new Error("config.json must be an object");
1717
}
1818
} catch (err) {
19+
if (
20+
!environment.production ||
21+
environment.appVersion === "UNKNOWN" ||
22+
environment.appVersion === "0.0.0"
23+
) {
24+
// continue in dev versions (e.g. to enable GitHub PR deployments)
25+
return;
26+
}
27+
1928
// if offline, the config.json should be served by the service worker
2029
// if we cannot get a valid config.json, we won't be able to switch to session_type "synced" and load client data
2130

0 commit comments

Comments
 (0)