Merge pull request #1373 from realm/fix-RN-debugging-android

Fix rn debugging android
This commit is contained in:
blagoev 2017-10-03 00:55:46 +03:00 committed by GitHub
commit 1fb5d65e94

View File

@ -158,6 +158,11 @@ class RealmReactModule extends ReactContextBaseJavaModule {
e.printStackTrace();
}
final String json = map.get("postData");
if (json == null) {
Response response = newFixedLengthResponse("");
response.addHeader("Access-Control-Allow-Origin", "http://localhost:8081");
return response;
}
final String jsonResponse = processChromeDebugCommand(cmdUri, json);
Response response = newFixedLengthResponse(jsonResponse);