fix RN debugging on Android

This commit is contained in:
blagoev 2017-10-03 00:23:31 +03:00
parent 33c4a886d0
commit 7a039d5407
1 changed files with 5 additions and 0 deletions

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);