Skip to content

Commit

Permalink
build: allow app to start without config.json in dev versions
Browse files Browse the repository at this point in the history
  • Loading branch information
sleidig committed Aug 1, 2024
1 parent 9c7d887 commit 6627f7c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/bootstrap-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ export async function initEnvironmentConfig() {
throw new Error("config.json must be an object");
}
} catch (err) {
if (
!environment.production ||
environment.appVersion === "UNKNOWN" ||
environment.appVersion === "0.0.0"
) {
// continue in dev versions (e.g. to enable GitHub PR deployments)
return;
}

// if offline, the config.json should be served by the service worker
// if we cannot get a valid config.json, we won't be able to switch to session_type "synced" and load client data

Expand Down

0 comments on commit 6627f7c

Please sign in to comment.