File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -491,8 +491,11 @@ - (id) init
491
491
callback:(RCTResponseSenderBlock) callback)
492
492
{
493
493
NSString *key = [self getDBListenerKey: path withModifiers: modifiersString];
494
+ NSArray *listenerKeys;
494
495
FirestackDBReference *ref = [_dbReferences objectForKey: key];
495
- if (ref != nil ) {
496
+ if (ref == nil ) {
497
+ listenerKeys = @[];
498
+ } else {
496
499
if (eventName == nil || [eventName isEqualToString: @" " ]) {
497
500
[ref cleanup ];
498
501
[_dbReferences removeObjectForKey: key];
@@ -502,12 +505,13 @@ - (id) init
502
505
[_dbReferences removeObjectForKey: key];
503
506
}
504
507
}
508
+ listenerKeys = [ref listenerKeys ];
505
509
}
506
510
callback (@[[NSNull null ], @{
507
511
@" result" : @" success" ,
508
512
@" handle" : path,
509
513
@" modifiersString" : modifiersString,
510
- @" remainingListeners" : [ref listenerKeys ] ,
514
+ @" remainingListeners" : listenerKeys,
511
515
}]);
512
516
}
513
517
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-native-firestack" ,
3
- "version" : " 2.3.3 " ,
3
+ "version" : " 3.0.0-alpha " ,
4
4
"author" : " Ari Lerner <ari@fullstack.io> (https://fullstackreact.com)" ,
5
5
"description" : " A firebase v3 adapter" ,
6
6
"main" : " index" ,
You can’t perform that action at this time.
0 commit comments