Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Nov 17, 2020
1 parent 512b528 commit fed467e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/LiveStatus.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
const { apiBaseUrl } = config["status-website"];
let sites = [];
const isGitHubApi = apiBaseUrl.includes("api.github.com");
const isGitHubApi = (apiBaseUrl || "").includes("api.github.com");
const userContentBaseUrl = isGitHubApi ? `https://github.com/raw` : apiBaseUrl;
const graphsBaseUrl = `${userContentBaseUrl}/${owner}/${repo}/master/graphs`;
Expand Down
4 changes: 2 additions & 2 deletions src/utils/createOctokit.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Octokit } from "@octokit/rest";
import config from "../data/config.json";

const { apiBaseUrl: baseUrl } = config["status-website"]
const { apiBaseUrl: baseUrl } = config["status-website"] || {};
const userAgent = config.userAgent;

export const createOctokit = () =>
new Octokit({
baseUrl,
userAgent,
});
});

0 comments on commit fed467e

Please sign in to comment.