File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 11import { NativeAppEventEmitter , NativeModules } from 'react-native' ;
2- import promisify from 'es6-promisify' ;
2+ // import promisify from 'es6-promisify';
3+ import Promise from 'bluebird'
34
45const WeChatAPI = NativeModules . WeChatAPI ;
56
@@ -57,7 +58,7 @@ function wrapCheckApi(nativeFunc) {
5758 return undefined ;
5859 }
5960
60- const promisified = promisify ( nativeFunc , translateError ) ;
61+ const promisified = Promise . promisify ( nativeFunc , translateError ) ;
6162 return ( ...args ) => {
6263 return promisified ( ...args ) ;
6364 } ;
@@ -71,7 +72,7 @@ function wrapApi(nativeFunc) {
7172 return undefined ;
7273 }
7374
74- const promisified = promisify ( nativeFunc , translateError ) ;
75+ const promisified = Promise . promisify ( nativeFunc , translateError ) ;
7576 return async function ( ...args ) {
7677 if ( ! WeChatAPI . isAppRegistered ) {
7778 throw new Error ( '注册应用失败' ) ;
You can’t perform that action at this time.
0 commit comments