mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-10 01:32:17 +02:00
msg_preview: fix possibly undefined error
This commit is contained in:
parent
4b07e05491
commit
96848c1c1b
|
@ -5,7 +5,7 @@ socket.on("msg:preview", function (data) {
|
||||||
const netChan = store.getters.findChannel(data.chan);
|
const netChan = store.getters.findChannel(data.chan);
|
||||||
const message = netChan?.channel.messages.find((m) => m.id === data.id);
|
const message = netChan?.channel.messages.find((m) => m.id === data.id);
|
||||||
|
|
||||||
if (!message) {
|
if (!message || !message.previews) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue