File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -221,7 +221,9 @@ export async function loadChanges(files: (CurrentTextFile | CurrentBinaryFile)[]
221221 workspaceState . update ( `${ file . uniqueId } :mtime` , mtime > 0 ? mtime : undefined ) ;
222222 if ( notIsfs ( file . uri ) ) {
223223 let content : Document [ "content" ] ;
224- if ( isClass ( file . uri . path ) ) {
224+ if ( ! isClass ( file . uri . path ) ) {
225+ content = ( await api . getDoc ( file . name , file . uri ) ) . result . content ;
226+ } else {
225227 // Insert/update the storage part of class definition.
226228 content = new TextDecoder ( 'utf-8' ) . decode ( await vscode . workspace . fs . readFile ( file . uri ) ) . split ( / \r ? \n / g) ;
227229 let storageBegin : number ; // the last "Storage ..." line
@@ -247,8 +249,6 @@ export async function loadChanges(files: (CurrentTextFile | CurrentBinaryFile)[]
247249 } else {
248250 content . splice ( classEnd , 0 , ...storage )
249251 }
250- } else {
251- content = ( await api . getDoc ( file . name , file . uri ) ) . result . content ;
252252 }
253253 exportedUris . add ( file . uri . toString ( ) ) ; // Set optimistically
254254 await vscode . workspace . fs
You can’t perform that action at this time.
0 commit comments