Handle unsupported spotify urls

This commit is contained in:
Jonathan Cremin 2015-01-13 12:44:06 +00:00
parent f605e72699
commit a6bca5536f

View file

@ -8,5 +8,5 @@ module.exports.match = function(url, type) {
}
var matches = parse(url).path.match(/\/(album|track)[\/]+([^\/]+)/);
return !!matches[2];
return matches && !!matches[2];
};