diff --git a/src/_data/helpers/music.js b/src/_data/helpers/music.js index fbb07770..71f6d2a6 100644 --- a/src/_data/helpers/music.js +++ b/src/_data/helpers/music.js @@ -4,7 +4,7 @@ export const artistCapitalization = (artist) => artistCapitalizationPatches[arti const sanitizeMediaString = (string) => string.normalize('NFD').replace(/[\u0300-\u036f\u2010—\.\?\(\)\[\]\{\}]/g, '').replace(/\.{3}/g, '').replace(/A©|é/g, 'e'); -export const buildChart = (tracks, artists, albums, nowPlaying) => { +export const buildChart = (tracks, artists, albums, nowPlaying = {}) => { const artistsData = {} const albumsData = {} const tracksData = {} diff --git a/src/_data/musicCharts.js b/src/_data/musicCharts.js index 652901aa..abfd5d22 100644 --- a/src/_data/musicCharts.js +++ b/src/_data/musicCharts.js @@ -5,8 +5,8 @@ export default async function () { const monthChart = JSON.parse(await readFile('./src/_data/json/scrobbles-month-chart.json', 'utf8')); const artists = JSON.parse(await readFile('./src/_data/json/artists-map.json', 'utf8')); const albums = JSON.parse(await readFile('./src/_data/json/albums-map.json', 'utf8')); - console.log(buildChart(monthChart['data'], artists, albums, nowPlaying)) + console.log(buildChart(monthChart['data'], artists, albums)) return { - month: buildChart(monthChart['data'], artists, albums, nowPlaying) + month: buildChart(monthChart['data'], artists, albums) } } \ No newline at end of file