[0.77] Fix RN-Tester JSC instacrashing

This commit is contained in:
Nicola Corti
2024-12-31 11:38:33 +00:00
parent bb9d7ad9a9
commit ff742883d6
@@ -268,8 +268,12 @@ public class StackTraceHelper {
List<ReadableMap> readableMapList = new ArrayList<>();
for (ParsedError.StackFrame frame : frames) {
JavaOnlyMap map = new JavaOnlyMap();
map.putDouble(COLUMN_KEY, frame.getColumn());
map.putDouble(LINE_NUMBER_KEY, frame.getLineNumber());
if (frame.getColumn() != null) {
map.putDouble(COLUMN_KEY, frame.getColumn());
}
if (frame.getLineNumber() != null) {
map.putDouble(LINE_NUMBER_KEY, frame.getLineNumber());
}
map.putString(FILE_KEY, (String) frame.getFile());
map.putString(METHOD_NAME_KEY, (String) frame.getMethodName());
readableMapList.add(map);