Skip to content

Commit 141f9a6

Browse files
committed
Take into account that extractProofs might map over null
Per review comment by @XanderVertegaal in #79.
1 parent 7517ffe commit 141f9a6

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
@@ -52,7 +52,8 @@ export class ParseService {
5252
* the `proofs` and apply the `nltk2tableau` transformation to each proof
5353
* within.
5454
*/
55-
function extractProofs(response: ParseResponse) {
55+
function extractProofs(response: ParseResponse | null) {
56+
if (!response || !response.data) return null;
5657
// This is basically just `_.mapObject(response.data.proofs, nltk2tableau)`,
5758
// but we don't depend on Underscore yet.
5859
const {entailment, contradiction} = response.data.proofs;

0 commit comments

Comments
 (0)