fix reference compare to null
This commit is contained in:
parent
e4ae2609da
commit
11de8dd5a9
|
@ -416,7 +416,7 @@ public class RNFirebaseDatabase extends ReactContextBaseJavaModule {
|
|||
@ReactMethod
|
||||
public void off(String key, String eventRegistrationKey) {
|
||||
RNFirebaseDatabaseReference nativeRef = references.get(key);
|
||||
if (nativeRef) {
|
||||
if (nativeRef != null) {
|
||||
nativeRef.removeEventListener(eventRegistrationKey);
|
||||
|
||||
if (!nativeRef.hasListeners()) {
|
||||
|
|
Loading…
Reference in New Issue