Shore up itunes

This commit is contained in:
Jonathan Cremin 2014-12-05 19:46:01 +00:00
parent 04e3f92aa4
commit 01b4209ba1

View file

@ -19,7 +19,7 @@ module.exports.lookupId = function(id, type) {
request.get(apiRoot + path, function(res) {
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");
error.status = 404;
deferred.reject(error);