Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions tools/site-creator/site-creator.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,18 @@ class SiteCreator extends LitElement {
const value = input.value.toLowerCase();
input.value = value; // Update the input field with lowercase value

const url = new URL(value);
const org = url.pathname.split('/')[1];
const repo = url.pathname.split('/')[2];
try {
const url = new URL(value);
const org = url.pathname.split('/')[1];
const repo = url.pathname.split('/')[2];

if (org && repo && url.hostname === 'github.com') {
this._status = null;
this._data = { org, repo };
if (org && repo && url.hostname === 'github.com') {
this._status = null;
this._data = { org, repo };
}
} catch (error) {
// We don't care about form change errors so long as the value is a url
// upon form submission.
}
}

Expand Down