mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-25 18:37:19 +00:00
Lift arguments object reference up to origin scope
See explanation: https://github.com/EmergingTechnologyAdvisors/node-serialport/issues/1245 Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
This commit is contained in:
parent
468dfc29d7
commit
fb86820e4e
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue