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