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

This commit is contained in:
Sebastian "Sebbie" Silbermann
2026-01-29 18:32:18 +01:00
committed by GitHub
parent 230772f99d
commit da64117876

View File

@@ -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':