Skip to content

Commit

Permalink
fix: cancel creating new file (#281)
Browse files Browse the repository at this point in the history
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
  • Loading branch information
btea and sxzz committed Sep 7, 2024
1 parent 5a92a92 commit 7467f38
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/editor/FileSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ function focus({ el }: VNode) {
function doneNameFile() {
if (!pending.value) return
if (!pendingFilename.value) {
pending.value = false
return
}
// add back the src prefix
const filename = 'src/' + pendingFilename.value
const oldFilename = pending.value === true ? '' : pending.value
Expand Down

0 comments on commit 7467f38

Please sign in to comment.