Skip to content

Commit

Permalink
Fixed goofy short-circuit bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed Aug 3, 2021
1 parent cd3b12e commit fc07195
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ export class ComponentMeasuresView extends View {
_drawSingleReactComponentMeasure(
context: CanvasRenderingContext2D,
rect: Rect,
event: ReactComponentMeasure,
componentMeasure: ReactComponentMeasure,
scaleFactor: number,
showHoverHighlight: boolean,
): boolean {
const {frame} = this;
const {componentName, duration, timestamp, warning} = event;
const {componentName, duration, timestamp, warning} = componentMeasure;

const xStart = timestampToPosition(timestamp, scaleFactor, frame);
const xStop = timestampToPosition(timestamp + duration, scaleFactor, frame);
Expand Down Expand Up @@ -146,14 +146,13 @@ export class ComponentMeasuresView extends View {
let didDrawMeasure = false;
componentMeasures.forEach(componentMeasure => {
didDrawMeasure =
didDrawMeasure ||
this._drawSingleReactComponentMeasure(
context,
visibleArea,
componentMeasure,
scaleFactor,
componentMeasure === _hoveredComponentMeasure,
);
) || didDrawMeasure;
});

if (!didDrawMeasure) {
Expand Down

0 comments on commit fc07195

Please sign in to comment.