chore: Improve typings around model methods (#6324)

This commit is contained in:
Tom Moor
2023-12-28 20:11:27 -04:00
committed by GitHub
parent ed1f345326
commit 55a55376c6
15 changed files with 89 additions and 65 deletions

View File

@@ -87,7 +87,7 @@ export default class CommentsStore extends Store<Comment> {
documentId,
...options,
});
invariant(res && res.data, "Comment list not available");
invariant(res?.data, "Comment list not available");
runInAction("CommentsStore#fetchDocumentComments", () => {
res.data.forEach(this.add);