Skip to content

Commit

Permalink
fix draft saving for empty front matter
Browse files Browse the repository at this point in the history
  • Loading branch information
juandjara committed Nov 10, 2023
1 parent 69c4a6c commit 11fc169
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/routes/p/$project/$cid/$pid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export async function action({ request, params }: ActionArgs) {
body,
title: title || getBasename(fullPath),
attributes: Object.fromEntries(
(matter || '').split('\n').map(line => {
(matter || '').split('\n').filter(Boolean).map(line => {
const [key, ...value] = line.split(':')
return [key.trim(), value.join(':').trim()]
})
Expand Down

0 comments on commit 11fc169

Please sign in to comment.