@@ -105,8 +105,10 @@ import './styles.css';
105
105
106
106
createRoot (document .createElement (' div' ), {
107
107
onUncaughtError : (error , errorInfo ) => {
108
- // The stacks are logged instead of showing them in the UI directly to highlight that browsers will apply sourcemaps to the logged stacks.
109
- // Note that sourcemapping is only applied in the real browser console not in the fake one displayed on this page.
108
+ // The stacks are logged instead of showing them in the UI directly to
109
+ // highlight that browsers will apply sourcemaps to the logged stacks.
110
+ // Note that sourcemapping is only applied in the real browser console not
111
+ // in the fake one displayed on this page.
110
112
console .log (errorInfo .componentStack );
111
113
console .log (captureOwnerStack ());
112
114
},
@@ -235,14 +237,18 @@ const root = createRoot(document.getElementById('root'), {
235
237
if (process .env .NODE_ENV !== ' production' ) {
236
238
const ownerStack = captureOwnerStack ();
237
239
error .stack =
238
- // The stack is only split because these sandboxes don't implement ignore-listing 3rd party frames via sourcemaps.
239
- // A framework would ignore-list stackframes from React via sourcemaps and then you could just `error.stack += ownerStack`.
240
+ // The stack is only split because these sandboxes don't implement
241
+ // ignore-listing 3rd party frames via sourcemaps.
242
+ // A framework would ignore-list stackframes from React via sourcemaps
243
+ // and then you could just `error.stack += ownerStack`.
240
244
// To learn more about ignore-listing see https://developer.chrome.com/docs/devtools/x-google-ignore-list
241
245
error .stack .split (' \n at react-stack-bottom-frame' )[0 ] + ownerStack;
242
246
}
243
247
244
- // The stacks are logged instead of showing them in the UI directly to highlight that browsers will apply sourcemaps to the logged stacks.
245
- // Note that sourcemapping is only applied in the real browser console not in the fake one displayed on this page.
248
+ // The stacks are logged instead of showing them in the UI directly to
249
+ // highlight that browsers will apply sourcemaps to the logged stacks.
250
+ // Note that sourcemapping is only applied in the real browser console not
251
+ // in the fake one displayed on this page.
246
252
console .error (' Uncaught' , error);
247
253
},
248
254
}).render (< App / > );
0 commit comments