diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/StackTraceHelper.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/StackTraceHelper.java index 21409bd9eb0a39..9975ae6e7e6837 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/StackTraceHelper.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/StackTraceHelper.java @@ -268,8 +268,12 @@ public static JavaOnlyMap convertProcessedError(ProcessedError error) { List readableMapList = new ArrayList<>(); for (ProcessedError.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);