diff options
| author | Onestay <[email protected]> | 2017-04-23 15:26:45 +0200 |
|---|---|---|
| committer | Onestay <[email protected]> | 2017-04-23 15:26:45 +0200 |
| commit | 480a38d26048ae5c6e8264cab0f3096a4c471fc6 (patch) | |
| tree | d72d9d7a44fd06a10a2a62bac2c9ebdaf5b9a6ca /public | |
| parent | remove debug console.log (diff) | |
| download | host.fuwn.me-480a38d26048ae5c6e8264cab0f3096a4c471fc6.tar.xz host.fuwn.me-480a38d26048ae5c6e8264cab0f3096a4c471fc6.zip | |
change let and const to var to support older browsers
Diffstat (limited to 'public')
| -rw-r--r-- | public/js/home.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/public/js/home.js b/public/js/home.js index bb0f62c..1b99e0d 100644 --- a/public/js/home.js +++ b/public/js/home.js @@ -65,19 +65,19 @@ upload.prepareUpload = function(){ // I think this fits best here because we need to check for a valid token before we can get the albums if (upload.token) { - const select = document.querySelector('select'); + var select = document.querySelector('select'); axios.get('/api/albums', { headers: { token: upload.token }}) .then(function(res) { - let albums = res.data.albums; + var albums = res.data.albums; // if the user doesn't have any albums we don't really need to display // an album selection if (albums.length === 0) return; // loop through the albums and create an option for each album - for (let i = 0; i < albums.length; i++) { - let opt = document.createElement('option'); + for (var i = 0; i < albums.length; i++) { + var opt = document.createElement('option'); opt.value = albums[i].id; opt.innerHTML = albums[i].name; select.appendChild(opt); |