Skip to content

Commit

Permalink
fix reorder action
Browse files Browse the repository at this point in the history
  • Loading branch information
juandjara committed Dec 24, 2023
1 parent 294b1c0 commit 8114340
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/lib/projects.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ export async function updateCollectionFileOrder(token: string, payload: UpdateOr

const contents = [] as string[]
for (const file of files) {
if (!file.attributes.order) {
file.attributes.order = files.indexOf(file)
}
const matter = Object.entries(file.attributes)
.map(([key, value]) => `${key}: ${key === 'order' ? files.indexOf(file) : value}`)
.join('\n')
Expand Down

0 comments on commit 8114340

Please sign in to comment.