From 896722cea5bc3b9e89d3fc319a390698f0748729 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Wed, 21 Apr 2021 20:58:19 +0200 Subject: [PATCH] Fixed get_countries_charts --- deezer/api.js | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deezer/api.js b/deezer/api.js index 947fea5..5b652f7 100644 --- a/deezer/api.js +++ b/deezer/api.js @@ -417,8 +417,8 @@ class API{ // Extra calls async get_countries_charts(){ - let temp = await this.get_user_playlists('637006841', {index:0, limit:-1})['data'] - let result = temp.sort((a, b) => a.title.localeCompare(b.title)) // Sort all playlists + let temp = await this.get_user_playlists('637006841', {index:0, limit:-1}) + let result = temp['data'].sort((a, b) => a.title.localeCompare(b.title)) // Sort all playlists if (!result[0].title.startsWith('Top')) result.shift() // Remove loved tracks playlist return result } diff --git a/package-lock.json b/package-lock.json index 3cfbcf8..8795824 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "deezer-js", - "version": "0.0.5", + "version": "0.0.6", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "0.0.5", + "version": "0.0.6", "license": "GPL-3.0-or-later", "dependencies": { "got": "^11.8.2", diff --git a/package.json b/package.json index 8698a71..1d8bf54 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "deezer-js", - "version": "0.0.5", + "version": "0.0.6", "description": "A wrapper for all Deezer's APIs", "main": "deezer/index.js", "scripts": {