[MM-35245] Null check to prevent console error in preload script on unloaded server (#1582)

This commit is contained in:
Devin Binnie 2021-05-05 17:14:42 -04:00 committed by GitHub
parent 87bbad13fa
commit 7d333dfe8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,7 +63,7 @@ window.addEventListener('load', () => {
});
const parentTag = (target) => {
if (target.parentNode) {
if (target.parentNode && target.parentNode.tagName) {
return target.parentNode.tagName.toUpperCase();
}
return null;