Skip to content

Commit

Permalink
fix: discard profile if it has no frames
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasBa committed Jun 22, 2023
1 parent 9818ee3 commit f0be011
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/browser/src/profiling/hubextensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ export function wrapTransactionWithProfiling(transaction: Transaction): Transact
return null;
}

// Discard a profile if it has no frames - happens if code was idling or sampling
// did not collect any frames.
if(!p.frames.length){
return null;
}

addToProfileQueue({ ...p, profile_id: profileId });
return null;
})
Expand Down

0 comments on commit f0be011

Please sign in to comment.