Skip to content

Commit d477d9c

Browse files
Merge pull request #100 from CaptainUnbrauchbar/fix-issue-97
fix: 🐛 handle unsatisfiable results correctly
2 parents 9bf5ce2 + d2a2f1b commit d477d9c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/extension.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function activate(context) {
8484
solve: result?.Time.Solve,
8585
model: result?.Time.Model,
8686
},
87-
answers: result?.Call.flatMap((call) => call.Witnesses.map((witness) => witness.Value.join(", "))),
87+
answers: result?.Call.flatMap((call) => call.Witnesses?.map((witness) => witness.Value.join(", "))),
8888
result: result?.Result,
8989
};
9090
}

src/runClingoWasmForFileWithProgress.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ async function runClingoWasmForFileWithProgress(vscode, progress, filePath, mode
5757
});
5858

5959
// Validate the result
60-
if (["ERROR", "UNSATISFIABLE", "UNKNOWN"].includes(wasmResult.Result)) {
60+
if (["ERROR", "UNKNOWN"].includes(wasmResult.Result)) {
6161
if ("Error" in wasmResult) {
6262
vscode.window.showErrorMessage(`Clingo WASM Error: ${wasmResult.Error}`);
6363
} else {

0 commit comments

Comments
 (0)