Skip to content

Commit 2488e6b

Browse files
committed
boring case first
1 parent 453936c commit 2488e6b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/commands/compile.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)