Skip to content

Commit

Permalink
Merge pull request #511 from SiaFoundation/fix_renterd_health_crash
Browse files Browse the repository at this point in the history
fix: renterd file health stats popover
  • Loading branch information
ChrisSchinnerl authored Feb 27, 2024
2 parents 2b02be6 + 84af887 commit c87e17b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/fuzzy-eagles-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'renterd': patch
---

Fixed an issue where hovering over the file health information would crash the app. Closes https://github.com/SiaFoundation/renterd/issues/997
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ export function FilesHealthColumnContents({
}

const slabs = sortBy(
obj.data.object.slabs.map((s) => ({
obj.data.object.slabs?.map((s) => ({
...s.slab,
key: `${s.offset}${s.length}${s.slab.key}`,
isPartialSlab: !!s.slab.shards,
contractSetShards: s.slab.shards?.length
? computeSlabContractSetShards({
Expand All @@ -65,7 +66,7 @@ export function FilesHealthColumnContents({
health: s.slab.health,
})
: 0,
})),
})) || [],
'contractSetShards'
)

Expand Down

0 comments on commit c87e17b

Please sign in to comment.