Skip to content

Commit d7d8061

Browse files
KenChoiKenChoi
authored andcommitted
fix ios init notification bug
1 parent 3261013 commit d7d8061

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ios/RCTJMessageModule/RCTJMessageModule.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ + (id)allocWithZone:(NSZone *)zone {
4545

4646
- (id)init {
4747
self = [super init];
48-
48+
[self initNotifications];
49+
self.SendMsgCallbackDic = @{}.mutableCopy;
4950
return self;
5051
}
5152

@@ -55,6 +56,7 @@ - (void)setBridge:(RCTBridge *)bridge {
5556
}
5657

5758
-(void)initNotifications {
59+
[[NSNotificationCenter defaultCenter] removeObserver:self];
5860

5961
NSNotificationCenter *defaultCenter = [NSNotificationCenter defaultCenter];
6062
// have

0 commit comments

Comments
 (0)