Skip to content

Commit

Permalink
fix(ui): SharedData errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Apr 12, 2018
1 parent d018e1f commit 60b86eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@vue/cli-ui/src/util/shared-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function genQuery (id) {
id
},
fetchPolicy: 'cache-and-network',
update: ({ sharedData }) => sharedData.value,
update: ({ sharedData }) => (sharedData && sharedData.value) || undefined,
subscribeToMore: {
document: SHARED_DATA_UPDATED,
variables: {
Expand Down Expand Up @@ -68,7 +68,7 @@ export default {
...genQuery(id),
manual: true,
result: ({ data }) => {
data && cb(data.sharedData.value)
data && data.sharedData && cb(data.sharedData.value)
}
})
},
Expand Down

0 comments on commit 60b86eb

Please sign in to comment.