Skip to content

Commit

Permalink
fix: fixed missing name for old collection metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
mbret committed May 26, 2024
1 parent c2cbe63 commit 4654a3d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/web/src/collections/getMetadataFromCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ export const getMetadataFromCollection = (
): Return => {
const list = item?.metadata ?? []

const userMetadata = item?.metadata?.find((item) => item.type === "user")
const userMetadata =
item?.metadata?.find((item) => item.type === "user") ??
({
type: "user",
title: item?.name
} satisfies CollectionMetadata)
const linkMetadata = item?.metadata?.find((item) => item.type === "link")

const orderedList = [...list].sort((a, b) => {
Expand Down

0 comments on commit 4654a3d

Please sign in to comment.