mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-15 00:46:22 +00:00
change let and const to var to support older browsers
This commit is contained in:
parent
07f1b1ca3c
commit
480a38d260
@ -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
|
// I think this fits best here because we need to check for a valid token before we can get the albums
|
||||||
if (upload.token) {
|
if (upload.token) {
|
||||||
const select = document.querySelector('select');
|
var select = document.querySelector('select');
|
||||||
|
|
||||||
axios.get('/api/albums', { headers: { token: upload.token }})
|
axios.get('/api/albums', { headers: { token: upload.token }})
|
||||||
.then(function(res) {
|
.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
|
// if the user doesn't have any albums we don't really need to display
|
||||||
// an album selection
|
// an album selection
|
||||||
if (albums.length === 0) return;
|
if (albums.length === 0) return;
|
||||||
|
|
||||||
// loop through the albums and create an option for each album
|
// loop through the albums and create an option for each album
|
||||||
for (let i = 0; i < albums.length; i++) {
|
for (var i = 0; i < albums.length; i++) {
|
||||||
let opt = document.createElement('option');
|
var opt = document.createElement('option');
|
||||||
opt.value = albums[i].id;
|
opt.value = albums[i].id;
|
||||||
opt.innerHTML = albums[i].name;
|
opt.innerHTML = albums[i].name;
|
||||||
select.appendChild(opt);
|
select.appendChild(opt);
|
||||||
|
Loading…
Reference in New Issue
Block a user