File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -64,11 +64,9 @@ export function useStore(
64
64
}
65
65
66
66
function init ( ) {
67
- watchEffect ( ( ) =>
68
- compileFile ( store , activeFile . value ) . then (
69
- ( errs ) => ( errors . value = errs ) ,
70
- ) ,
71
- )
67
+ watchEffect ( ( ) => {
68
+ compileFile ( store , activeFile . value ) . then ( ( errs ) => ( errors . value = errs ) )
69
+ } )
72
70
73
71
watch (
74
72
( ) => [
@@ -218,8 +216,11 @@ export function useStore(
218
216
if ( mainFile . value === oldFilename ) {
219
217
mainFile . value = newFilename
220
218
}
221
-
222
- compileFile ( store , file ) . then ( ( errs ) => ( errors . value = errs ) )
219
+ if ( activeFilename . value === oldFilename ) {
220
+ activeFilename . value = newFilename
221
+ } else {
222
+ compileFile ( store , file ) . then ( ( errs ) => ( errors . value = errs ) )
223
+ }
223
224
}
224
225
const getImportMap : Store [ 'getImportMap' ] = ( ) => {
225
226
try {
You can’t perform that action at this time.
0 commit comments