Skip to content
Snippets Groups Projects
Commit 9d14ea75 authored by Brian Peiris's avatar Brian Peiris
Browse files

process.env.RETICULUM_SERVER is not defined in prod

parent ce127558
No related branches found
No related tags found
No related merge requests found
...@@ -124,7 +124,11 @@ class HomeRoot extends Component { ...@@ -124,7 +124,11 @@ class HomeRoot extends Component {
} }
loadEnvironmentFromScene = async () => { loadEnvironmentFromScene = async () => {
const sceneInfoUrl = `https://${process.env.RETICULUM_SERVER}/api/v1/scenes/${this.props.sceneId}`; let sceneUrlBase = "/api/v1/scenes";
if (process.env.RETICULUM_SERVER) {
sceneUrlBase = `https://${process.env.RETICULUM_SERVER}${sceneUrlBase}`;
}
const sceneInfoUrl = `${sceneUrlBase}/${this.props.sceneId}`;
const resp = await fetch(sceneInfoUrl).then(r => r.json()); const resp = await fetch(sceneInfoUrl).then(r => r.json());
const scene = resp.scenes[0]; const scene = resp.scenes[0];
// Transform the scene info into a an environment bundle structure. // Transform the scene info into a an environment bundle structure.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment