Shore up itunes
This commit is contained in:
parent
04e3f92aa4
commit
01b4209ba1
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ module.exports.lookupId = function(id, type) {
|
||||||
request.get(apiRoot + path, function(res) {
|
request.get(apiRoot + path, function(res) {
|
||||||
var data = JSON.parse(res.text);
|
var data = JSON.parse(res.text);
|
||||||
|
|
||||||
if (!data.results || !data.results[0].collectionId) {
|
if (!data.results || !data.results[0] || !data.results[0].collectionId) {
|
||||||
var error = new Error("Not Found");
|
var error = new Error("Not Found");
|
||||||
error.status = 404;
|
error.status = 404;
|
||||||
deferred.reject(error);
|
deferred.reject(error);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue