Apply suggestions from code review

Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
Signed-off-by: Max Schmitt <max@schmitt.mx>
This commit is contained in:
Max Schmitt 2024-07-18 15:50:24 +02:00 committed by GitHub
parent b07e5aa927
commit bd654db9c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -29,7 +29,7 @@ import type { ConsoleEntry } from './consoleTab';
type TimelineBar = {
action?: ActionTraceEventInContext;
resource?: Entry;
consoleMessage?: ConsoleEntry
consoleMessage?: ConsoleEntry;
leftPosition: number;
rightPosition: number;
leftTime: number;
@ -116,7 +116,7 @@ export const Timeline: React.FunctionComponent<{
for (const bar of bars) {
if (highlightedAction)
bar.active = bar.action === highlightedAction;
if (highlightedEntry)
else if (highlightedEntry)
bar.active = bar.resource === highlightedEntry;
else if (highlightedConsoleEntry)
bar.active = bar.consoleMessage === highlightedConsoleEntry;