[Perf Tracks] Handle function names that aren't strings (#35659)

This commit is contained in:
Sebastian "Sebbie" Silbermann authored and GitHub committed 2026-01-29 18:32:18 +01:00
1 parent 230772f99d
commit da64117876
1 file changed
+7 -2
@@ -253,10 +253,15 @@ export function addValueToProperties(
return;
}
case 'function':
if (value.name === '') {
const functionName = value.name;
if (
functionName === '' ||
// e.g. proxied functions or classes with a static property "name" that's not a string
typeof functionName !== 'string'
) {
desc = '() => {}';
} else {
desc = value.name + '() {}';
desc = functionName + '() {}';
}
break;
case 'string':