Find channel in joinchannel correctly
This commit is contained in:
parent
a21e0e34cd
commit
2c5549a567
@ -50,6 +50,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
network: Object,
|
||||||
channel: Object,
|
channel: Object,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -60,8 +61,8 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
const utils = require("../js/utils");
|
const channelToFind = this.inputChannel.toLowerCase();
|
||||||
const existingChannel = utils.findCurrentNetworkChan(this.inputChannel);
|
const existingChannel = this.network.channels.find((c) => c.name.toLowerCase() === channelToFind);
|
||||||
|
|
||||||
if (existingChannel) {
|
if (existingChannel) {
|
||||||
const $ = require("jquery");
|
const $ = require("jquery");
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
/>
|
/>
|
||||||
<JoinChannel
|
<JoinChannel
|
||||||
v-if="network.isJoinChannelShown"
|
v-if="network.isJoinChannelShown"
|
||||||
|
:network="network"
|
||||||
:channel="network.channels[0]"
|
:channel="network.channels[0]"
|
||||||
@toggleJoinChannel="network.isJoinChannelShown = !network.isJoinChannelShown"
|
@toggleJoinChannel="network.isJoinChannelShown = !network.isJoinChannelShown"
|
||||||
/>
|
/>
|
||||||
|
Loading…
Reference in New Issue
Block a user