diff --git a/index.js b/index.js index 5d1ca37..78799de 100644 --- a/index.js +++ b/index.js @@ -3,7 +3,7 @@ */ import {NativeModules, NativeAppEventEmitter} from 'react-native'; -import promisify from 'es6-promisify'; +import Promise from 'bluebird'; const {WeiboAPI} = NativeModules; @@ -27,7 +27,7 @@ function wrapApi(nativeFunc) { if (!nativeFunc) { return undefined; } - const promisified = promisify(nativeFunc, translateError); + const promisified = Promise.promisify(nativeFunc, translateError); return (...args) => { return promisified(...args); }; diff --git a/package.json b/package.json index 5bc592b..d6a9757 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,6 @@ }, "homepage": "https://github.com/reactnativecn/react-native-weibo#readme", "dependencies": { - "es6-promisify": "^3.0.0" + "bluebird": "^3.5.0" } }