Skip to content

Commit

Permalink
Remove location (breaks Node, also see #57)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeaVerou committed Oct 16, 2023
1 parent fdd332d commit 5808981
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion backends/coda/table/coda-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default class CodaTable extends Coda {
}

static parseURL (source) {
let url = new URL(source, location);
let url = new URL(source);

if (url.host === "coda.io") {
for (let pattern in patterns) {
Expand Down
4 changes: 2 additions & 2 deletions backends/github/api/github-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ export default class GithubAPI extends Github {
}

static test (url) {
url = new URL(url, location);
url = new URL(url);
return url.host === "api.github.com";
}

static parseURL (source) {
let ret = {
url: new URL(source, location)
url: new URL(source)
};

if (ret.url.pathname == "/graphql") {
Expand Down
2 changes: 1 addition & 1 deletion backends/github/file/github-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ export default class GithubFile extends Github {
}

static test (url) {
url = new URL(url, location);
url = new URL(url);
return ["github.com", "raw.githubusercontent.com"].includes(url.host);
}

Expand Down
2 changes: 1 addition & 1 deletion src/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export default class Backend extends EventTarget {
}

static parseURL(source) {
let url = new URL(source, location);
let url = new URL(source);
return {url};
}

Expand Down
2 changes: 1 addition & 1 deletion src/oauth-backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export default class OAuthBackend extends AuthBackend {
popup.left = (screen.width - popup.width)/2;

let state = {
url: location.href,
url: globalThis.location?.href,
backend: oAuthBackend.name
};

Expand Down

0 comments on commit 5808981

Please sign in to comment.