File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
packages/react-native/Libraries Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change 11
11
( 'use strict' ) ;
12
12
import type { ExtendedError } from '../../Core/ExtendedError' ;
13
13
import type { LogLevel } from './LogBoxLog' ;
14
- import type { Stack } from './LogBoxSymbolication' ;
15
14
import type {
16
15
Category ,
17
16
ComponentStack ,
@@ -30,7 +29,7 @@ export type LogData = $ReadOnly<{|
30
29
message : Message ,
31
30
category : Category ,
32
31
componentStack : ComponentStack ,
33
- stack ?: Stack ,
32
+ stack ?: string ,
34
33
| } > ;
35
34
36
35
export type Observer = (
@@ -199,7 +198,7 @@ export function addLog(log: LogData): void {
199
198
// otherwise spammy logs would pause rendering.
200
199
setImmediate ( ( ) => {
201
200
try {
202
- const stack = log . stack ?? parseErrorStack ( errorForStackTrace ?. stack ) ;
201
+ const stack = parseErrorStack ( log . stack ?? errorForStackTrace ?. stack ) ;
203
202
204
203
appendNewLog (
205
204
new LogBoxLog ( {
Original file line number Diff line number Diff line change 10
10
11
11
import typeof { enable } from 'promise/setimmediate/rejection-tracking' ;
12
12
13
- const parseErrorStack = require ( './Core/Devtools/parseErrorStack' ) ;
14
13
const LogBox = require ( './LogBox/LogBox' ) . default ;
15
14
16
15
let rejectionTrackingOptions : $NonMaybeType < Parameters < enable > [ 0 ] > = {
@@ -33,13 +32,11 @@ let rejectionTrackingOptions: $NonMaybeType<Parameters<enable>[0]> = {
33
32
34
33
// Print pretty unhandled rejections while on DEV
35
34
if ( __DEV__ ) {
36
- const parsedStack = parseErrorStack ( error . stack ) ;
37
-
38
35
LogBox . addLog ( {
39
36
level : 'warn' ,
40
37
message : { content : warning , substitutions : [ ] } ,
41
38
componentStack : [ ] ,
42
- stack : parsedStack ,
39
+ stack : error . stack ,
43
40
category : 'possible_unhandled_promise_rejection' ,
44
41
} ) ;
45
42
You can’t perform that action at this time.
0 commit comments