Check page title exists first.

This commit is contained in:
Mike Cao 2023-04-24 18:07:27 -07:00
parent 4a51a5db3f
commit c23373d164

View File

@ -159,11 +159,15 @@
const observer = new MutationObserver(callback);
observer.observe(document.querySelector('head > title'), {
subtree: true,
characterData: true,
childList: true,
});
const node = document.querySelector('head > title');
if (node) {
observer.observe(node, {
subtree: true,
characterData: true,
childList: true,
});
}
};
const send = payload => {