Skip to content

Commit

Permalink
Remove commitRootId from RenderReasons
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister committed May 17, 2022
1 parent a1841a8 commit fd20b2a
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/view/components/profiler/components/RenderReasons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,11 @@ export function RenderReasons() {

const hasReasons = reason !== null && reason.items && reason.items.length > 0;

let rendered = false;
if (!captureReason && commit) {
const root = commit.nodes.get(commit.commitRootId);
if (
root &&
selected &&
selected.startTime >= root.startTime &&
selected.endTime <= root.endTime
) {
rendered = true;
}
}
const rendered =
!captureReason &&
commit &&
selected &&
commit.rendered.includes(selected.id);

return (
<SidebarPanel title="Render reasons">
Expand Down

0 comments on commit fd20b2a

Please sign in to comment.