Skip to content

Commit

Permalink
Merge pull request #7 from lorenzos/patch-1
Browse files Browse the repository at this point in the history
Fixed choice of parser on case-insensitive file extension
  • Loading branch information
karaul committed Jun 20, 2024
2 parents 9ff5d38 + 8137638 commit 447b990
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,8 @@ document.addEventListener('DOMContentLoaded', function () {
function parseBLOB(blob) {
var parser;
const filename = document.getElementById("files").value;
if (filename.slice(-4) === ".fit") parser = fitParser;
if (filename.slice(-4) === ".tkl") parser = tklParser;
if (filename.slice(-4).toLowerCase() === ".fit") parser = fitParser;
if (filename.slice(-4).toLowerCase() === ".tkl") parser = tklParser;
let timeStartParsing = performance.now();
parser.parse(blob, function (error, data) {
if (error) {
Expand Down Expand Up @@ -1038,4 +1038,4 @@ document.addEventListener('DOMContentLoaded', function () {
xhr.send(null);
}

});
});

0 comments on commit 447b990

Please sign in to comment.