2
0
mirror of synced 2025-01-24 05:08:59 +00:00

fix reference compare to null

This commit is contained in:
Omer Levy 2017-10-18 11:36:16 +03:00 committed by Chris Bianca
parent aa36487ec1
commit 252b879ef4

View File

@ -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()) {