protect router from creating new straeams - fixed
This commit is contained in:
parent
d45aac7de3
commit
c8d1e2672e
2 changed files with 2 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ export default {
|
||||||
this.$store.commit("setTopics", []);
|
this.$store.commit("setTopics", []);
|
||||||
this.$store.commit("setRules", []);
|
this.$store.commit("setRules", []);
|
||||||
this.$store.commit("setCurStream", to.path.replace("/", ""));
|
this.$store.commit("setCurStream", to.path.replace("/", ""));
|
||||||
if (this.currentStream != "" && this.streams.includes(this.currentStream)) {
|
if (this.currentStream != "" && this.streams.find(s => s.name == this.currentStream)) {
|
||||||
this.setUpDoc(this.currentStream);
|
this.setUpDoc(this.currentStream);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ export default {
|
||||||
...mapState(["currentStream", "streams"]),
|
...mapState(["currentStream", "streams"]),
|
||||||
...mapGetters(["sortedTopics"]),
|
...mapGetters(["sortedTopics"]),
|
||||||
title() {
|
title() {
|
||||||
return this.streams.includes(this.currentStream) ?
|
return this.streams.find(s => s.name == this.currentStream) ?
|
||||||
this.currentStream.replace("pub-", "") : 'Stream does not exist.'
|
this.currentStream.replace("pub-", "") : 'Stream does not exist.'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue