Merge pull request #21835 from pselden/mobx-apollo-data

[mobx-apollo] data in the query result can potentially be undefined
This commit is contained in:
Benjamin Lichtman
2017-11-29 14:30:14 -05:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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>;
}
+1 -1
View File
@@ -27,7 +27,7 @@ class PostStore {
}
get posts() {
return this.postsQuery.data.posts;
return this.postsQuery.data && this.postsQuery.data.posts;
}
}