diff --git a/changelog.js b/changelog.js
index a72a8da..24ad800 100644
--- a/changelog.js
+++ b/changelog.js
@@ -323,6 +323,8 @@ function dateFormatting(date) {
// main app function. sorts all commits received by getCommits() function based on user's options.
async function sortCommits() {
+ document.getElementById("loader").innerHTML = "
";
+
let urlField = document.getElementById("urlhtml").value.toString();
// if is a url converts it to something usable
if (urlField.match(new RegExp(`(\\.com\\/)(.*)`, 'i'))) {
@@ -342,11 +344,12 @@ async function sortCommits() {
const others = [];
const othersRaw = [];
+
+
if (urlField === "" || apiField === "") {
alert("Both URL and API token need to be inputted")
+ document.getElementById("loader").innerHTML = '';
} else {
- document.getElementById("loader").innerHTML = "
";
-
// \s all special characters in a string in order to input that into a regex
function quotemeta(str) {
return (str + '').replace(/([\.\\\+\*\?\[\^\]\$\(\)])/g, '\\$1');
diff --git a/index.html b/index.html
index d6866e3..e5d50f3 100644
--- a/index.html
+++ b/index.html
@@ -327,12 +327,12 @@