Skip to content

Commit f0be011

Browse files
committed
fix: discard profile if it has no frames
1 parent 9818ee3 commit f0be011

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/browser/src/profiling/hubextensions.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,12 @@ export function wrapTransactionWithProfiling(transaction: Transaction): Transact
216216
return null;
217217
}
218218

219+
// Discard a profile if it has no frames - happens if code was idling or sampling
220+
// did not collect any frames.
221+
if(!p.frames.length){
222+
return null;
223+
}
224+
219225
addToProfileQueue({ ...p, profile_id: profileId });
220226
return null;
221227
})

0 commit comments

Comments
 (0)