File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ function startAddFile() {
32
32
33
33
while (true ) {
34
34
let hasConflict = false
35
- for (const file in store .state .files ) {
36
- if (file === name ) {
35
+ for (const filename in store .state .files ) {
36
+ if (stripSrcPrefix ( filename ) === name ) {
37
37
hasConflict = true
38
38
name = ` Comp${++ i }.vue `
39
39
break
Original file line number Diff line number Diff line change @@ -310,7 +310,7 @@ export class ReplStore implements Store {
310
310
const exported : Record < string , string > = { }
311
311
for ( const filename in this . state . files ) {
312
312
const normalized =
313
- filename === importMapFile ? filename : filename . replace ( / ^ s r c \/ / , '' )
313
+ filename === importMapFile ? filename : stripSrcPrefix ( filename )
314
314
exported [ normalized ] = this . state . files [ filename ] . code
315
315
}
316
316
return exported
You can’t perform that action at this time.
0 commit comments