refactor: small style improvements

This commit is contained in:
henrygd
2025-08-29 17:23:47 -04:00
parent 96f441de40
commit 81d43fbf6e
4 changed files with 18 additions and 10 deletions

View File

@@ -107,8 +107,10 @@ export const updateSystemList = (() => {
// we need to loop once to get the longest name
let longestName = $longestSystemNameLen.get()
for (const { name } of records) {
if (name.length > longestName) {
$longestSystemNameLen.set(Math.min(20, name.length))
const nameLen = Math.min(20, name.length)
if (nameLen > longestName) {
$longestSystemNameLen.set(nameLen)
longestName = nameLen
}
}
$systems.set(records)