Skip to content
Snippets Groups Projects
Commit ae37fb6c authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

fix: remove remaining uses of var-declared variables

parent 00330aee
No related branches found
No related tags found
No related merge requests found
......@@ -309,7 +309,7 @@ export default {
// temporary data (which will be used to check if anything changed) and
// then open the editing modal
editFile: function (id) {
var file = this.getFileById(id)
const file = this.getFileById(id)
this.filemeta.id = file.id
this.filemeta.artist = file.metadata.artist
this.filemeta.album = file.metadata.album
......
......@@ -137,7 +137,7 @@ export default {
methods: {
playlistToolTip(entries) {
let text = '<div style="white-space: nowrap;" align="left">'
for (var i in entries) {
for (const i of entries) {
text += i + ': ' + entries[i].uri + '<br>'
}
text += '</div>'
......
function compareEpisodesByDate(a, b) {
var dateA = new Date(a.start)
var dateB = new Date(b.start)
const dateA = new Date(a.start)
const dateB = new Date(b.start)
if (dateA < dateB) {
return -1
} else if (dateA > dateB) {
......@@ -13,9 +13,9 @@ function compareEpisodesByDate(a, b) {
export default {
computed: {
timeslotsPast: function () {
var eps = []
var now = new Date()
for (var x in this.timeslotsSortedDate) {
const eps = []
const now = new Date()
for (const x of this.timeslotsSortedDate) {
if (new Date(this.timeslots[x].start) < now) {
eps.push(this.timeslots[x])
}
......@@ -23,9 +23,9 @@ export default {
return eps
},
timeslotsFuture: function () {
var eps = []
var now = new Date()
for (var x in this.timeslotsSortedDate) {
const eps = []
const now = new Date()
for (const x of this.timeslotsSortedDate) {
if (new Date(this.timeslots[x].start) >= now) {
eps.push(this.timeslots[x])
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment