Flame Graph: Fix crash when it receives empty data (#95604)

flame graph crash
This commit is contained in:
jackyin 2024-11-11 19:09:11 +08:00 committed by GitHub
parent c7aef6a375
commit 3012d4c043
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -237,7 +237,7 @@ export function checkFields(data: DataFrame): CheckFieldsResult | undefined {
for (const field of fields) {
const [name, types] = field;
const frameField = data.fields.find((f) => f.name === name);
const frameField = data?.fields.find((f) => f.name === name);
if (!frameField) {
missingFields.push(name);
continue;