mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-10 21:25:24 +03:00
Always ensure logLine is defined
This commit is contained in:
parent
af17d9c8fd
commit
f98b0ee6f0
@ -340,19 +340,28 @@ function Logs() {
|
||||
</div>
|
||||
</div>
|
||||
{logLines.length > 0 &&
|
||||
[...Array(logRange.end - 1).keys()].map((idx) =>
|
||||
idx >= logRange.start ? (
|
||||
[...Array(logRange.end - 1).keys()].map((idx) => {
|
||||
const logLine =
|
||||
idx >= logRange.start
|
||||
? logLines[idx - logRange.start]
|
||||
: undefined;
|
||||
|
||||
if (logLine) {
|
||||
return (
|
||||
<LogLineData
|
||||
key={`${idx}-${logService}`}
|
||||
startRef={idx == logRange.start + 10 ? startLogRef : undefined}
|
||||
startRef={
|
||||
idx == logRange.start + 10 ? startLogRef : undefined
|
||||
}
|
||||
className={initialScroll ? "" : "invisible"}
|
||||
offset={idx}
|
||||
line={logLines[idx - logRange.start]}
|
||||
/>
|
||||
) : (
|
||||
<div key={`${idx}-${logService}`} className="h-12" />
|
||||
),
|
||||
)}
|
||||
);
|
||||
}
|
||||
|
||||
return <div key={`${idx}-${logService}`} className="h-12" />;
|
||||
})}
|
||||
{logLines.length > 0 && <div id="page-bottom" ref={endLogRef} />}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user