mirror of
https://github.com/thelounge/thelounge.git
synced 2024-05-18 22:26:35 +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 message = netChan?.channel.messages.find((m) => m.id === data.id);
|
||||
|
||||
if (!message) {
|
||||
if (!message || !message.previews) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue