Skip to content

Commit

Permalink
Fix for exporting empty playlists [Fixes #7]
Browse files Browse the repository at this point in the history
  • Loading branch information
watsonbox committed Jul 1, 2015
1 parent 5a47758 commit 7147981
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions exportify.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,12 @@ var PlaylistExporter = {
var responses = [];

// Handle either single or multiple responses
if (typeof arguments[0].href == 'undefined') {
responses = Array.prototype.slice.call(arguments).map(function(a) { return a[0] });
} else {
responses = [arguments[0]];
if (typeof arguments[0] != 'undefined') {
if (typeof arguments[0].href == 'undefined') {
responses = Array.prototype.slice.call(arguments).map(function(a) { return a[0] });
} else {
responses = [arguments[0]];
}
}

var tracks = responses.map(function(response) {
Expand Down

0 comments on commit 7147981

Please sign in to comment.