fix(frontend): adds null checks re #190
This commit is contained in:
@@ -71,10 +71,11 @@
|
||||
<router-view></router-view>
|
||||
<v-snackbar v-model="streamSnackbar" :timeout="5000" color="primary" absolute right top>
|
||||
New stream
|
||||
<i v-if="streamSnackbarInfo.name">{{ streamSnackbarInfo.name }}</i>
|
||||
<i v-if="streamSnackbarInfo && streamSnackbarInfo.name">{{ streamSnackbarInfo.name }}</i>
|
||||
<span v-else>available</span>
|
||||
<template #action="{ attrs }">
|
||||
<v-btn
|
||||
v-if="streamSnackbarInfo"
|
||||
text
|
||||
v-bind="attrs"
|
||||
:to="'/streams/' + streamSnackbarInfo.id"
|
||||
@@ -139,8 +140,10 @@ export default {
|
||||
}
|
||||
`,
|
||||
result(streamInfo) {
|
||||
this.streamSnackbar = true
|
||||
this.streamSnackbarInfo = streamInfo.data.userStreamAdded
|
||||
if (streamInfo.data.userStreamAdded) {
|
||||
this.streamSnackbar = true
|
||||
this.streamSnackbarInfo = streamInfo.data.userStreamAdded
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ export default {
|
||||
id: this.$route.params.streamId
|
||||
}
|
||||
},
|
||||
result() {
|
||||
result(info) {
|
||||
this.$apollo.queries.stream.refetch()
|
||||
}
|
||||
},
|
||||
@@ -96,6 +96,7 @@ export default {
|
||||
}
|
||||
},
|
||||
result(commitInfo) {
|
||||
if (!commitInfo.data.commitCreated) return
|
||||
this.commitSnackbar = true
|
||||
this.commitSnackbarInfo = commitInfo.data.commitCreated
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user