mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
[mobx-apollo] data in the query result can potentially be undefined
This commit is contained in:
Vendored
+1
-1
@@ -19,7 +19,7 @@ export interface MobxApolloQueryOptions<T> extends WatchQueryOptions {
|
||||
|
||||
export interface MobxApolloQuery<T> {
|
||||
loading: boolean;
|
||||
data: T;
|
||||
data?: T;
|
||||
error?: ApolloError;
|
||||
ref: ObservableQuery<T>;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class PostStore {
|
||||
}
|
||||
|
||||
get posts() {
|
||||
return this.postsQuery.data.posts;
|
||||
return this.postsQuery.data && this.postsQuery.data.posts;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user