Ensure node is an Element in DOMPurify hook

ce67f3a658f50a169dbbbc032d7e52744ff180e2

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +4 -0Ignore whitespace
public/script.js+4 -0
@@ -366,6 +366,10 @@ DOMPurify.addHook('uponSanitizeElement', (node, _, config) => {
366 return;366 return;
367 }367 }
368368
369 if (!(node instanceof Element)) {
370 return;
371 }
372
369 let mediaBlocked = false;373 let mediaBlocked = false;
370374
371 switch (node.tagName) {375 switch (node.tagName) {