mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-18 09:06:06 +00:00
perf: avoid double-calling row.original.streams - reuse hasStreams
This is a micro-optimization, but prevents checking row.original.streams twice and also guards checking for stale streams unless we know we have streams. The performance hit before would have been tiny, but every bit counts.
This commit is contained in:
parent
a318d919d8
commit
31fb27dffc
1 changed files with 1 additions and 1 deletions
|
|
@ -1134,7 +1134,7 @@ const ChannelsTable = ({ onReady }) => {
|
|||
const hasStreams =
|
||||
row.original.streams && row.original.streams.length > 0;
|
||||
const hasStaleStreams =
|
||||
row.original.streams && row.original.streams.some((s) => s.is_stale);
|
||||
hasStreams && row.original.streams.some((s) => s.is_stale);
|
||||
|
||||
if (!hasStreams) {
|
||||
return { className: 'no-streams-row' };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue