Skip to content

Commit b5c5e71

Browse files
author
Guillaume Chau
committed
fix(ui): ProjectNav error
1 parent a92bd1b commit b5c5e71

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/@vue/cli-ui/src/components/ProjectNav.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ export default {
4242
document: VIEW_ADDED,
4343
updateQuery: (previousResult, { subscriptionData }) => {
4444
const view = subscriptionData.data.viewAdded
45+
if (!previousResult.views) {
46+
return {
47+
views: [ view ]
48+
}
49+
}
4550
if (previousResult.views.find(r => r.id === view.id)) return previousResult
4651
return {
4752
views: [

0 commit comments

Comments
 (0)