File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
packages/react-error-overlay/src Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -167,3 +167,15 @@ window.__REACT_ERROR_OVERLAY_GLOBAL_HOOK__.iframeReady = function iframeReady()
167
167
isLoadingIframe = false ;
168
168
updateIframeContent ( ) ;
169
169
} ;
170
+
171
+ var testFunc = function testFn ( ) { } ;
172
+ if ( ( testFunc . name || testFunc . toString ( ) ) . indexOf ( 'testFn' ) !== - 1 ) {
173
+ console . warn (
174
+ 'It looks like you are using `react-error-overlay` in production. When ' +
175
+ 'deploying an application, `react-error-overlay` should be excluded ' +
176
+ 'as it is a heavy dependency meant for development.\n\n' +
177
+ 'Consider adding an error boundary to your tree to customize error ' +
178
+ 'handling behavior. See https://fb.me/react-error-boundaries for more ' +
179
+ 'information.'
180
+ ) ;
181
+ }
You can’t perform that action at this time.
0 commit comments