Skip to content

Commit

Permalink
fix: fix js code issues on fontawesome removing code (#889)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfguerrerom authored Oct 2, 2023
2 parents c297a0a + 6535822 commit abad859
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sepal_ui/frontend/js/fontawesome.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
*/

function remove_fa5() {
links = document.querySelectorAll(
let links = document.querySelectorAll(
"link[href^='https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@^5']"
);

links.forEach((link) => link.remove());
}

if (document.readyState != "loading") remove_fa5();
else document.addEventListener("DOMContentLoader", remove_fa5());
else document.addEventListener("DOMContentLoaded", remove_fa5);

0 comments on commit abad859

Please sign in to comment.