mirror of
https://github.com/thelounge/thelounge
synced 2025-02-16 13:18:24 +00:00
previews: fix possibly undefined
This commit is contained in:
parent
96848c1c1b
commit
f25fee4c6c
2 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ function input() {
|
|||
for (const message of store.state.activeChannel.channel.messages) {
|
||||
let toggled = false;
|
||||
|
||||
for (const preview of message.previews) {
|
||||
for (const preview of message.previews || []) {
|
||||
if (preview.shown) {
|
||||
preview.shown = false;
|
||||
toggled = true;
|
||||
|
|
|
@ -11,7 +11,7 @@ function input() {
|
|||
for (const message of store.state.activeChannel.channel.messages) {
|
||||
let toggled = false;
|
||||
|
||||
for (const preview of message.previews) {
|
||||
for (const preview of message.previews || []) {
|
||||
if (!preview.shown) {
|
||||
preview.shown = true;
|
||||
toggled = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue