diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2019-04-29 11:21:05 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2019-04-29 11:21:05 -0400 |
| commit | aa1f670baee8c4809d90408420c00793a944941c (patch) | |
| tree | b16dc01998c57ce246e826d36e2021cc20a0059c /static | |
| parent | ed1231475e4d7bdc6fb1b73a76a669952c2639da (diff) | |
releases.js: move list insertion code together
Diffstat (limited to 'static')
| -rw-r--r-- | static/releases.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/static/releases.js b/static/releases.js index f97a7d93..acc13442 100644 --- a/static/releases.js +++ b/static/releases.js @@ -50,8 +50,6 @@ for (const channel of channels) { const updateFilename = device + "-ota_update-" + metadata[0] + ".zip"; const updateUrl = baseUrl + updateFilename; - const list = document.getElementById(channel); - const model = deviceModel(device); const release = document.createElement("div"); @@ -73,13 +71,13 @@ for (const channel of channels) { release.appendChild(document.createElement("br")); release.appendChild(createLink(updateUrl, updateFilename)); + const list = document.getElementById(channel); for (const item of list.children) { if (model < item.dataset.model) { list.insertBefore(release, item); return; } } - list.appendChild(release); }); } |
