Skip to content

Commit efb39c5

Browse files
authored
Fix uncaught errors (intersystems-community#1001)
1 parent 7242b03 commit efb39c5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/commands/compile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ What do you want to do?`,
140140
return Promise.reject();
141141
});
142142
} else {
143-
if (error.errorText && error.errorText !== "") {
143+
if (error && error.errorText && error.errorText !== "") {
144144
outputChannel.appendLine("\n" + error.errorText);
145145
vscode.window
146146
.showErrorMessage(

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
10951095
return importAndCompile(false, file, config("compileOnSave"));
10961096
}
10971097
} else if (file.uri.scheme === "file") {
1098-
if (isImportableLocalFile(file)) {
1098+
if (isImportableLocalFile(file) && new AtelierAPI(file.uri).active) {
10991099
// This local file is part of a CSP application
11001100
// or matches our export settings, so import it on save
11011101
return importFileOrFolder(file.uri, true);

0 commit comments

Comments
 (0)