Skip to content

Commit

Permalink
Fix label formatting in appview-v1 (#2294)
Browse files Browse the repository at this point in the history
fix label formatting in appview-v1
  • Loading branch information
dholms authored Mar 12, 2024
1 parent db5ff13 commit 2117982
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/bsky/src/services/label/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,15 @@ const fetchLabelsForSubjects = async (
.selectAll()
.execute()
const labelMap = res.reduce((acc, cur) => {
const { src, uri, cid, val, neg, cts } = cur
acc[cur.uri] ??= []
acc[cur.uri].push({
...cur,
cid: cur.cid === '' ? undefined : cur.cid,
neg: cur.neg,
src,
uri,
cid: cid === '' ? undefined : cid,
val,
neg: neg,
cts,
})
return acc
}, {} as Record<string, Label[]>)
Expand Down

0 comments on commit 2117982

Please sign in to comment.