mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 14:00:21 +00:00
Find channel in joinchannel correctly
This commit is contained in:
parent
a21e0e34cd
commit
2c5549a567
2 changed files with 4 additions and 2 deletions
|
@ -50,6 +50,7 @@ export default {
|
|||
},
|
||||
},
|
||||
props: {
|
||||
network: Object,
|
||||
channel: Object,
|
||||
},
|
||||
data() {
|
||||
|
@ -60,8 +61,8 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
const utils = require("../js/utils");
|
||||
const existingChannel = utils.findCurrentNetworkChan(this.inputChannel);
|
||||
const channelToFind = this.inputChannel.toLowerCase();
|
||||
const existingChannel = this.network.channels.find((c) => c.name.toLowerCase() === channelToFind);
|
||||
|
||||
if (existingChannel) {
|
||||
const $ = require("jquery");
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
/>
|
||||
<JoinChannel
|
||||
v-if="network.isJoinChannelShown"
|
||||
:network="network"
|
||||
:channel="network.channels[0]"
|
||||
@toggleJoinChannel="network.isJoinChannelShown = !network.isJoinChannelShown"
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue