Skip to content

Commit 3857439

Browse files
committed
fix(database, android): revert double-emulator protection
apparently there is a flawed assumption somewhere, for this double-protection in the android code caused the emulator to not work
1 parent 572a80f commit 3857439

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

packages/database/android/src/main/java/io/invertase/firebase/database/UniversalFirebaseDatabaseCommon.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,9 @@ static FirebaseDatabase getDatabaseForApp(String appName, String dbURL) {
4747

4848
HashMap emulatorConfig = getEmulatorConfig(appName, dbURL);
4949

50-
if (emulatorConfig != null && emulatorConfig.get("configured") == null) {
50+
if (emulatorConfig != null) {
5151
firebaseDatabase.useEmulator(
5252
(String) emulatorConfig.get("host"), (Integer) emulatorConfig.get("port"));
53-
// The underlying SDK may only be configured once, but with hot-reloads in the
54-
// javascript bundle, javascript cannot hold SDK configuration state. Keep track here
55-
// so we only configure once
56-
emulatorConfig.put("configured", "true");
5753
}
5854

5955
return firebaseDatabase;

0 commit comments

Comments
 (0)