Skip to content

Commit

Permalink
fix(repl): don't crash on null log (#6896)
Browse files Browse the repository at this point in the history
  • Loading branch information
wmertens authored Sep 22, 2024
1 parent d925e1a commit a789e32
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/docs/src/repl/repl-console.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ export interface ReplConsoleProps {
export const ReplConsole = component$(({ store }: ReplConsoleProps) => {
return (
<div class="detail-logs">
{store.events.map((ev) => (
<ReplLog log={ev} key={ev.start} />
))}
{
// for some reason ev can be null, just skip it
store.events.map((ev) => ev && <ReplLog log={ev} key={ev.start} />)
}
</div>
);
});
Expand Down

0 comments on commit a789e32

Please sign in to comment.