2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00

return result from callback

returning the result of the callback allows you to chain the promise
like you would expect
This commit is contained in:
Jeffrey Horn
2015-09-02 10:43:27 -07:00
parent 8c1694e821
commit a130e787c3
3 changed files with 21 additions and 5 deletions
+1 -1
View File
@@ -22,6 +22,6 @@
*/
module.exports = function spread(callback) {
return function (arr) {
callback.apply(null, arr);
return callback.apply(null, arr);
};
};