We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 230772f commit da64117Copy full SHA for da64117
packages/shared/ReactPerformanceTrackProperties.js
@@ -253,10 +253,15 @@ export function addValueToProperties(
253
return;
254
}
255
case 'function':
256
- if (value.name === '') {
+ const functionName = value.name;
257
+ if (
258
+ functionName === '' ||
259
+ // e.g. proxied functions or classes with a static property "name" that's not a string
260
+ typeof functionName !== 'string'
261
+ ) {
262
desc = '() => {}';
263
} else {
- desc = value.name + '() {}';
264
+ desc = functionName + '() {}';
265
266
break;
267
case 'string':
0 commit comments