FIX: Error calling LazyYT from chat when disabled (#20085)
This commit is contained in:
parent
33e6140179
commit
bb35274984
|
@ -34,19 +34,20 @@ export default {
|
|||
}
|
||||
);
|
||||
}
|
||||
|
||||
api.decorateChatMessage(
|
||||
(element) => {
|
||||
element
|
||||
.querySelectorAll(".lazyYT:not(.lazyYT-video-loaded)")
|
||||
.forEach((iframe) => {
|
||||
$(iframe).lazyYT();
|
||||
});
|
||||
},
|
||||
{
|
||||
id: "lazy-yt",
|
||||
}
|
||||
);
|
||||
if (siteSettings.lazy_yt_enabled) {
|
||||
api.decorateChatMessage(
|
||||
(element) => {
|
||||
element
|
||||
.querySelectorAll(".lazyYT:not(.lazyYT-video-loaded)")
|
||||
.forEach((iframe) => {
|
||||
$(iframe).lazyYT();
|
||||
});
|
||||
},
|
||||
{
|
||||
id: "lazy-yt",
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
initialize(container) {
|
||||
|
|
Loading…
Reference in New Issue