Skip to content

Commit 83d2345

Browse files
committed
bug fixed about eventEmitter
1 parent a9d0574 commit 83d2345

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

index.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
* Created by lvbingru on 1/5/16.
33
*/
44

5-
import {NativeModules} from 'react-native';
5+
import {NativeModules, NativeAppEventEmitter} from 'react-native';
66
import promisify from 'es6-promisify';
77

88
const {WeiboAPI} = NativeModules;
99

10-
AppEventEmitter = require('RCTNativeAppEventEmitter')
11-
1210
// Used only with promisify. Transform callback to promise result.
1311
function translateError(err, result) {
1412
if (!err) {
@@ -58,7 +56,7 @@ function waitForResponse(type) {
5856
});
5957
}
6058

61-
AppEventEmitter.addListener('Weibo_Resp', resp => {
59+
NativeAppEventEmitter.addListener('Weibo_Resp', resp => {
6260
const callback = savedCallback;
6361
savedCallback = undefined;
6462
callback && callback(resp);

0 commit comments

Comments
 (0)