Skip to content

Commit 145690f

Browse files
committed
fixed a derp in promisify - apply args should be an array
1 parent 912fd0e commit 145690f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/utils/promisify.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ export default(fn, NativeModule) => (...args) => {
99
return new Promise((resolve, reject) => {
1010
const _fn = typeof fn === 'function' ? fn : NativeModule[fn];
1111
if (!_fn || typeof _fn !== 'function') return reject(new Error('Missing function for promisify.'));
12-
return _fn.apply(NativeModule, ...args, handler.bind(handler, resolve, reject));
12+
return _fn.apply(NativeModule, [...args, handler.bind(handler, resolve, reject)]);
1313
});
1414
};

0 commit comments

Comments
 (0)