File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -491,8 +491,11 @@ - (id) init
491491 callback:(RCTResponseSenderBlock) callback)
492492{
493493 NSString *key = [self getDBListenerKey: path withModifiers: modifiersString];
494+ NSArray *listenerKeys;
494495 FirestackDBReference *ref = [_dbReferences objectForKey: key];
495- if (ref != nil ) {
496+ if (ref == nil ) {
497+ listenerKeys = @[];
498+ } else {
496499 if (eventName == nil || [eventName isEqualToString: @" " ]) {
497500 [ref cleanup ];
498501 [_dbReferences removeObjectForKey: key];
@@ -502,12 +505,13 @@ - (id) init
502505 [_dbReferences removeObjectForKey: key];
503506 }
504507 }
508+ listenerKeys = [ref listenerKeys ];
505509 }
506510 callback (@[[NSNull null ], @{
507511 @" result" : @" success" ,
508512 @" handle" : path,
509513 @" modifiersString" : modifiersString,
510- @" remainingListeners" : [ref listenerKeys ] ,
514+ @" remainingListeners" : listenerKeys,
511515 }]);
512516}
513517
Original file line number Diff line number Diff line change 11{
22 "name" : " react-native-firestack" ,
3- "version" : " 2.3.3 " ,
3+ "version" : " 3.0.0-alpha " ,
44 "author" : " Ari Lerner <ari@fullstack.io> (https://fullstackreact.com)" ,
55 "description" : " A firebase v3 adapter" ,
66 "main" : " index" ,
You can’t perform that action at this time.
0 commit comments