diff --git a/packages/react-native/Libraries/LogBox/Data/LogBoxData.js b/packages/react-native/Libraries/LogBox/Data/LogBoxData.js index d3e06b0451303c..abc2401ac42159 100644 --- a/packages/react-native/Libraries/LogBox/Data/LogBoxData.js +++ b/packages/react-native/Libraries/LogBox/Data/LogBoxData.js @@ -30,6 +30,7 @@ export type LogData = $ReadOnly<{| message: Message, category: Category, componentStack: ComponentStack, + stack?: string, |}>; export type Observer = ( @@ -198,7 +199,7 @@ export function addLog(log: LogData): void { // otherwise spammy logs would pause rendering. setImmediate(() => { try { - const stack = parseErrorStack(errorForStackTrace?.stack); + const stack = parseErrorStack(log.stack ?? errorForStackTrace?.stack); appendNewLog( new LogBoxLog({ diff --git a/packages/react-native/Libraries/promiseRejectionTrackingOptions.js b/packages/react-native/Libraries/promiseRejectionTrackingOptions.js index a57f3666899d62..5f9c9a1dafd880 100644 --- a/packages/react-native/Libraries/promiseRejectionTrackingOptions.js +++ b/packages/react-native/Libraries/promiseRejectionTrackingOptions.js @@ -10,9 +10,9 @@ import typeof {enable} from 'promise/setimmediate/rejection-tracking'; -type ExtractOptionsType =
(((options?: ?P) => void)) => P;
+import LogBox from './LogBox/LogBox';
-let rejectionTrackingOptions: $Call