Skip to content

Commit 4091f87

Browse files
committed
stop page crash when deleting a lemma row
1 parent ecf5ef9 commit 4091f87

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/formReducer.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ class FormReducer extends ImmerReducer {
5050
}
5151
resetVerifiedWarnings(index) {
5252
this.draftState.verifiedAgainstStored[index] = undefined;
53-
this.draftState.lemmas[index].id = null;
53+
if (this.draftState.lemmas[index]) {
54+
this.draftState.lemmas[index].id = null;
55+
}
5456
}
5557
setUpdatedWarning(index, keys) {
5658
this.draftState.updatedFromStored[index] = keys.reduce((obj, key) => {

0 commit comments

Comments
 (0)