Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
Merge pull request #178 from hyperspacedev/develop-1.1.0-mod-and-loca…
Browse files Browse the repository at this point in the history
…ltest

Auto-set localhost:3000 URL when testing
  • Loading branch information
alicerunsonfedora authored Feb 26, 2020
2 parents 1e54b21 + afd3a7f commit 4e64a1d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/utilities/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,17 @@ export async function getConfig(): Promise<Config | undefined> {
let { location } = resp.data;

if (!location.endsWith("/")) {
console.warn(
console.info(
"Location does not have a backslash, so Hyperspace has added it automatically."
);
resp.data.location = location + "/";
}

if (process.env.NODE_ENV === "development") {
resp.data.location = "http://localhost:3000/";
console.info("Location field has been updated to localhost:3000.");
}

return resp.data as Config;
} catch (err) {
console.error(
Expand Down

0 comments on commit 4e64a1d

Please sign in to comment.