msg_preview: fix possibly undefined error

This commit is contained in:
Reto Brunner 2024-04-21 15:08:06 +02:00
parent 4b07e05491
commit 96848c1c1b

View file

@ -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;
}