Skip to content

Commit

Permalink
fix(ui): ProjectNav error
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Apr 27, 2018
1 parent a92bd1b commit b5c5e71
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/@vue/cli-ui/src/components/ProjectNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ export default {
document: VIEW_ADDED,
updateQuery: (previousResult, { subscriptionData }) => {
const view = subscriptionData.data.viewAdded
if (!previousResult.views) {
return {
views: [ view ]
}
}
if (previousResult.views.find(r => r.id === view.id)) return previousResult
return {
views: [
Expand Down

0 comments on commit b5c5e71

Please sign in to comment.