mirror of
https://github.com/henrygd/beszel.git
synced 2026-03-28 16:36:16 +01:00
refactor: small style improvements
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user