Refactor performer delta row conditions in PerformerResult

- Simplified conditions for displaying remote aliases and URLs by removing unnecessary checks against local counts.
- Ensured that rows are only pushed when remote counts exceed local counts, improving clarity and performance.
This commit is contained in:
KennyG 2026-04-21 16:36:23 -04:00
parent c7bfdfd3cd
commit d4080f2d9b

View file

@ -83,13 +83,13 @@ const buildPerformerDeltaRows = (
.filter(Boolean).length
: 0;
const localAliasesCount = local.alias_list?.length ?? 0;
if (remoteAliasesCount > 0 && remoteAliasesCount !== localAliasesCount) {
if (remoteAliasesCount > localAliasesCount) {
rows.push({ label: "Aliases", value: String(remoteAliasesCount) });
}
const remoteUrlsCount = remote.urls?.length ?? 0;
const localUrlsCount = local.urls?.length ?? 0;
if (remoteUrlsCount > 0 && remoteUrlsCount !== localUrlsCount) {
if (remoteUrlsCount > localUrlsCount) {
rows.push({ label: "URLs", value: String(remoteUrlsCount) });
}