diff --git a/lib/util.js b/lib/util.js index c1f8188..d246a6d 100644 --- a/lib/util.js +++ b/lib/util.js @@ -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);