Skip to content

Commit

Permalink
Fix for loop bug which breaks favicon replacement (#171)
Browse files Browse the repository at this point in the history
* create static array from htmlcollection
  • Loading branch information
mdouek authored Nov 9, 2023
1 parent 1d73700 commit 0da3393
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/webapp/simple-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"use strict";

function removeAll() {
var links = document.getElementsByTagName('link'),
var links = Array.from(document.getElementsByTagName('link')),
link, i;

for (i = 0; i < links.length; i++) {
Expand Down Expand Up @@ -30,4 +30,4 @@
global['org.jenkinsci.plugins.simpletheme'] = {
replaceFavicon: replaceFavicon
};
})(this, document);
})(this, document);

0 comments on commit 0da3393

Please sign in to comment.