Only lookup IP addresses when in Chrome debug mode
This commit is contained in:
parent
8d73a8e985
commit
d96c645415
|
@ -62,10 +62,13 @@ public class RealmReactModule extends ReactContextBaseJavaModule {
|
|||
|
||||
@Override
|
||||
public Map<String, Object> getConstants() {
|
||||
if (!isContextInjected()) {
|
||||
startWebServer();
|
||||
if (isContextInjected()) {
|
||||
// No constants are needed if *not* running in Chrome debug mode.
|
||||
return Collections.EMPTY_MAP;
|
||||
}
|
||||
|
||||
startWebServer();
|
||||
|
||||
List<String> hosts;
|
||||
if (RealmAnalytics.isRunningOnEmulator()) {
|
||||
hosts = Arrays.asList(new String[]{"localhost"});
|
||||
|
|
Loading…
Reference in New Issue