Skip to content

Commit 40918b6

Browse files
authored
Merge pull request #4733 from LianaHarris360/incorrect-view-only-channel
Incorrect view only channel
2 parents ecfbc9b + b83e0c6 commit 40918b6

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

contentcuration/contentcuration/frontend/channelEdit/views/TreeView/TreeViewBase.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,21 @@
465465
return DropEffect.COPY;
466466
},
467467
},
468+
watch: {
469+
rootId: {
470+
handler(id) {
471+
if (!id) {
472+
this.loadChannel().catch(() => {
473+
this.$store.dispatch('showSnackbarSimple', 'Failed to load channel');
474+
});
475+
}
476+
},
477+
immediate: true,
478+
},
479+
},
468480
methods: {
469481
...mapActions('channel', ['deleteChannel']),
482+
...mapActions('currentChannel', ['loadChannel']),
470483
handleDelete() {
471484
this.deleteChannel(this.currentChannel.id).then(() => {
472485
localStorage.snackbar = this.$tr('channelDeletedSnackbar');

contentcuration/contentcuration/frontend/channelEdit/views/TreeView/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
<div class="mt-5 pl-3">
9090
<LoadingText v-if="loading" />
9191
<StudioTree
92-
v-else
92+
v-else-if="rootId"
9393
:treeId="rootId"
9494
:nodeId="rootId"
9595
:selectedNodeId="nodeId"

0 commit comments

Comments
 (0)