Use arguments with #apply

This commit is contained in:
Nook Scheel 2015-11-29 21:47:04 +03:00
parent b2ff128e94
commit a81e11c4ae

View File

@ -58,11 +58,7 @@ helpers.jsx = template(`
helpers.asyncToGenerator = template(` helpers.asyncToGenerator = template(`
(function (fn) { (function (fn) {
return function () { return function () {
var args = new Array(arguments.length); var gen = fn.apply(this, arguments);
for(var i = 0; i < args.length; ++i) {
args[i] = arguments[i];
}
var gen = fn.apply(this, args);
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
function step(key, arg) { function step(key, arg) {
try { try {