Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
tomek-f committed Apr 14, 2016
1 parent f6605ea commit 2237d30
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* global define */

(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define([], factory);
Expand Down Expand Up @@ -66,7 +64,9 @@
// array of urls or array of objects
function all() {
if (!arguments.length) return Promise.reject(new Error('No files or no file configs'));
return Promise.all(Array.prototype.slice.call(arguments).map(getScript));
return Promise.all(Array.prototype.slice.call(arguments).map(function (e) {
return Array.isArray(e) ? getScript.apply(null, e) : getScript(e);
}));
}

getScript.deleteFromGlobal = deleteFromGlobal;
Expand Down

0 comments on commit 2237d30

Please sign in to comment.