Skip to content

Commit

Permalink
Lift arguments object reference up to origin scope
Browse files Browse the repository at this point in the history
See explanation: #1245

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
  • Loading branch information
rwaldron committed Jul 21, 2017
1 parent 468dfc2 commit fb86820
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ function promisify(func) {
throw new Error('"func" must be a function');
}
return function() {
const args = Array.from(arguments);
return new Promise((resolve, reject) => {
const args = Array.prototype.slice.apply(arguments);
args.push((err, data) => {
if (err) {
return reject(err);
Expand Down

0 comments on commit fb86820

Please sign in to comment.