# HG changeset patch # User Kevin Bullock # Date 1494814512 18000 # Node ID 0978d4880577bde9b551b999c33d237dd8603b85 # Parent 1188817fdf3a34d613d19be1c4cf077b0d74653c downloads: skip trying to fill in button if it's not there diff -r 1188817fdf3a -r 0978d4880577 static/js/download.js --- a/static/js/download.js Sun May 14 22:01:40 2017 -0500 +++ b/static/js/download.js Sun May 14 21:15:12 2017 -0500 @@ -135,10 +135,16 @@ (function (document, window) { var load = function () { + var versElement = document.getElementById('download-version') + , descElement = document.getElementById('download-description'); + + if (!(versElement && descElement)) { + return; + } + Downloader.init(sources); window.dl = Downloader.select(); - var versElement = document.getElementById('download-version') - , descElement = document.getElementById('download-description'); + versElement.appendChild(document.createTextNode(dl.attr('version'))); descElement.appendChild(document.createTextNode(dl.attr('desc'))); }