@@ -201,7 +201,12 @@ export function logComponentErrored(
201
201
// Skip
202
202
return ;
203
203
}
204
- if ( __DEV__ ) {
204
+ if (
205
+ __DEV__ &&
206
+ typeof performance !== 'undefined' &&
207
+ // $FlowFixMe[method-unbinding]
208
+ typeof performance . measure === 'function'
209
+ ) {
205
210
const properties = [ ] ;
206
211
for ( let i = 0 ; i < errors . length ; i ++ ) {
207
212
const capturedValue = errors [ i ] ;
@@ -256,7 +261,12 @@ function logComponentEffectErrored(
256
261
// Skip
257
262
return ;
258
263
}
259
- if ( __DEV__ ) {
264
+ if (
265
+ __DEV__ &&
266
+ typeof performance !== 'undefined' &&
267
+ // $FlowFixMe[method-unbinding]
268
+ typeof performance . measure === 'function'
269
+ ) {
260
270
const properties = [ ] ;
261
271
for ( let i = 0 ; i < errors . length ; i ++ ) {
262
272
const capturedValue = errors [ i ] ;
@@ -596,7 +606,12 @@ export function logRecoveredRenderPhase(
596
606
hydrationFailed : boolean ,
597
607
) : void {
598
608
if ( supportsUserTiming ) {
599
- if ( __DEV__ ) {
609
+ if (
610
+ __DEV__ &&
611
+ typeof performance !== 'undefined' &&
612
+ // $FlowFixMe[method-unbinding]
613
+ typeof performance . measure === 'function'
614
+ ) {
600
615
const properties = [ ] ;
601
616
for ( let i = 0 ; i < recoverableErrors . length ; i ++ ) {
602
617
const capturedValue = recoverableErrors [ i ] ;
@@ -715,7 +730,12 @@ export function logCommitErrored(
715
730
passive : boolean ,
716
731
) : void {
717
732
if ( supportsUserTiming ) {
718
- if ( __DEV__ ) {
733
+ if (
734
+ __DEV__ &&
735
+ typeof performance !== 'undefined' &&
736
+ // $FlowFixMe[method-unbinding]
737
+ typeof performance . measure === 'function'
738
+ ) {
719
739
const properties = [ ] ;
720
740
for ( let i = 0 ; i < errors . length ; i ++ ) {
721
741
const capturedValue = errors [ i ] ;
0 commit comments