Skip to content

Commit

Permalink
remove inserted file node if upload errors
Browse files Browse the repository at this point in the history
  • Loading branch information
amanharwara committed May 5, 2024
1 parent d93306a commit 69b21d9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default function FilePlugin({ currentNote }: { currentNote: SNNote }): JS
mutator.protected = note.protected
})
} else {
fileNode?.remove()
editor.update(() => fileNode?.remove())
}
})
.catch(console.error)
Expand Down

0 comments on commit 69b21d9

Please sign in to comment.