From b726646ea84914128e083f8736416f8e3a54c396 Mon Sep 17 00:00:00 2001 From: HugoPoi Date: Sat, 4 Jul 2020 18:08:12 +0200 Subject: [PATCH] fix: filter apple garbadge sended by myfreemp3 --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 62034b4..4be8f32 100644 --- a/index.js +++ b/index.js @@ -64,7 +64,8 @@ async function searchOnMyFreeMp3(query){ }), }) .then(res => res.text()) - .then(jsonp => vm.runInNewContext(jsonp, { callback: (payload) => payload.response })); + .then(jsonp => vm.runInNewContext(jsonp, { callback: (payload) => payload.response })) + .then(items => _.filter(items, _.isString)); } function matchScore(spotifyMetas, vkmusicMetas){