Handle zero matches on itunes better
This commit is contained in:
parent
401f70ae8e
commit
1d22cc47aa
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ module.exports.search = function(data) {
|
|||
request.get(apiRoot + path, function(res) {
|
||||
var data = JSON.parse(res.text);
|
||||
|
||||
if (!data.results[0].collectionId) {
|
||||
if (!data.results[0]) {
|
||||
deferred.resolve({service: "itunes"});
|
||||
} else {
|
||||
var result = data.results[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue