Skip to content

Commit

Permalink
Merge branch 'master' of github.com:espruino/EspruinoAppLoaderCore
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Sep 7, 2023
2 parents 8ad85c2 + 431a3fb commit 37a22e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ function htmlElement(str) {
return div.firstChild;
}
function httpGet(url) {
let isBinary = !(url.endsWith(".js") || url.endsWith(".json") || url.endsWith(".csv") || url.endsWith(".txt"));
let textExtensions = [".js", ".json", ".csv", ".txt", ".md"];
let isBinary = !textExtensions.some(ext => url.endsWith(ext));
return new Promise((resolve,reject) => {
let oReq = new XMLHttpRequest();
oReq.addEventListener("load", () => {
Expand Down

0 comments on commit 37a22e0

Please sign in to comment.