We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8676d3 commit 149c1d8Copy full SHA for 149c1d8
utils/InstabugUtils.js
@@ -52,7 +52,17 @@ export const captureJsErrors = () => {
52
}
53
54
function errorHandler(e, isFatal) {
55
- let jsStackTrace = parseErrorStackLib(e);
+ let jsStackTrace;
56
+ if (Platform.hasOwnProperty("constants")) {
57
+ // RN version >= 0.63
58
+ if (Platform.constants.reactNativeVersion.minor >= 64)
59
+ // RN version >= 0.64 -> Stacktrace as string
60
+ jsStackTrace = parseErrorStackLib(e.stack);
61
+ // RN version == 0.63 -> Stacktrace as string
62
+ else jsStackTrace = parseErrorStackLib(e);
63
+ }
64
+ // RN version < 0.63 -> Stacktrace as string
65
66
67
//JSON object to be sent to the native SDK
68
var jsonObject = {
0 commit comments