File tree 1 file changed +14
-8
lines changed
packages/react-error-overlay/src/components
1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -267,14 +267,20 @@ function createFrame(
267
267
268
268
let onSourceClick = null ;
269
269
if ( sourceFileName ) {
270
- onSourceClick = ( ) => {
271
- fetch (
272
- '/__open-stack-frame-in-editor?fileName=' +
273
- window . encodeURIComponent ( sourceFileName ) +
274
- '&lineNumber=' +
275
- window . encodeURIComponent ( sourceLineNumber || 1 )
276
- ) . then ( ( ) => { } , ( ) => { } ) ;
277
- } ;
270
+ // e.g. "/path-to-my-app/webpack/bootstrap eaddeb46b67d75e4dfc1"
271
+ const isInternalWebpackBootstrapCode = sourceFileName
272
+ . trim ( )
273
+ . indexOf ( ' ' ) !== - 1 ;
274
+ if ( ! isInternalWebpackBootstrapCode ) {
275
+ onSourceClick = ( ) => {
276
+ fetch (
277
+ '/__open-stack-frame-in-editor?fileName=' +
278
+ window . encodeURIComponent ( sourceFileName ) +
279
+ '&lineNumber=' +
280
+ window . encodeURIComponent ( sourceLineNumber || 1 )
281
+ ) . then ( ( ) => { } , ( ) => { } ) ;
282
+ } ;
283
+ }
278
284
}
279
285
280
286
const elem = frameDiv (
You can’t perform that action at this time.
0 commit comments