show team kills
All checks were successful
deploy / build-and-deploy (/testvaro, /opt/website-test, website-test) (push) Successful in 23s
deploy / build-and-deploy (/varo, /opt/website, website) (push) Successful in 13s

This commit is contained in:
2025-06-21 23:18:46 +02:00
parent daa1de302b
commit 023fd67004
2 changed files with 6 additions and 2 deletions

View File

@ -97,7 +97,11 @@
</div>
</td>
<td>
<span class="text-xs sm:text-md">0</span>
<span class="text-xs sm:text-md">
{deaths.filter(
(death) => death.killerUserId === team.memberOne.id || death.killerUserId === team.memberTwo.id
).length}
</span>
</td>
</tr>
{/each}

View File

@ -1,7 +1,7 @@
export function getObjectEntryByKey(key: string, data: { [key: string]: any }): any | undefined {
let entry = data;
for (const part of key.split('.')) {
entry = entry[part]
entry = entry[part];
if (entry === null || typeof entry !== 'object') return entry;
}
return entry;