From 7eb15a9ac6ecc1e3ec80194d744237c8dde48132 Mon Sep 17 00:00:00 2001 From: Jeremy Kauffman Date: Thu, 23 Feb 2017 17:29:52 -0500 Subject: [PATCH] fix pending changes to api.lbry.io --- js/lbry.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/js/lbry.js b/js/lbry.js index f594df25a..456033194 100644 --- a/js/lbry.js +++ b/js/lbry.js @@ -255,7 +255,15 @@ lbry.getFeaturedDiscoverNames = function(callback) { xhr.open('GET', 'https://api.lbry.io/discover/list', true); xhr.onload = () => { if (xhr.status === 200) { - resolve(JSON.parse(xhr.responseText)); + responseData = JSON.parse(xhr.responseText); + if (responseData.data) //new signature, once api.lbry.io is updated + { + resolve(responseData.data); + } + else + { + resolve(responseData); + } } else { reject(Error('Failed to fetch featured names.')); }