Skip to content

Commit 7467f38

Browse files
bteasxzz
andauthored
fix: cancel creating new file (#281)
Co-authored-by: 三咲智子 Kevin Deng <[email protected]>
1 parent 5a92a92 commit 7467f38

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/editor/FileSelector.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ function focus({ el }: VNode) {
5858
5959
function doneNameFile() {
6060
if (!pending.value) return
61+
if (!pendingFilename.value) {
62+
pending.value = false
63+
return
64+
}
65+
6166
// add back the src prefix
6267
const filename = 'src/' + pendingFilename.value
6368
const oldFilename = pending.value === true ? '' : pending.value

0 commit comments

Comments
 (0)