Skip to content

Commit 8270a96

Browse files
committed
Take into account that extractProofs might map over null
Per review comment by @XanderVertegaal in #79.
1 parent c45df66 commit 8270a96

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

frontend/src/app/services/parse.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ export class ParseService {
3737
* the `proofs` and apply the `nltk2tableau` transformation to each proof
3838
* within.
3939
*/
40-
function extractProofs(response: ParseResponse) {
40+
function extractProofs(response: ParseResponse | null) {
41+
if (!response) return null;
4142
// This is basically just `_.mapObject(response.data.proofs, nltk2tableau)`,
4243
// but we don't depend on Underscore yet.
4344
const {entailment, contradiction} = response.data.proofs;

0 commit comments

Comments
 (0)