Skip to content

Commit

Permalink
Update src/routes/edit/[slug].svelte
Browse files Browse the repository at this point in the history
Co-authored-by: mat <[email protected]>
  • Loading branch information
selectdev and mat-1 authored Jul 7, 2022
1 parent d3c90e2 commit 1ffc71d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/routes/edit/[slug].svelte
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@
async function submitEntry() {
// make a put request to /api/entry/<id>.json
// if successful, redirect to /entry/<slug>
entryTags = entryTags.split(',')
if (entryTags.length == 1 && entryTags[0] == '') {
entryTags = []
}
entryTags = entryTags.split(',').map(tag => tag.trim()).filter(tag => tag.length > 0)
const response: Entry | { error: string } = await fetch(`/api/entry/${entry.id}.json`, {
method: 'PUT',
headers: {
Expand Down

0 comments on commit 1ffc71d

Please sign in to comment.