Fix enabled property check in ZenPinnedTabManager for improved reliability

This commit is contained in:
mr. M
2024-11-10 18:54:46 +01:00
parent c3fc7d792e
commit 47fdeada01

View File

@@ -58,11 +58,11 @@
}
get enabled() {
if (!this._enabled) {
if (typeof this._enabled === 'undefined') {
this._enabled = !(
docElement.hasAttribute('privatebrowsingmode') ||
docElement.getAttribute('chromehidden').includes('toolbar') ||
docElement.getAttribute('chromehidden').includes('menubar')
document.documentElement.hasAttribute('privatebrowsingmode') ||
document.documentElement.getAttribute('chromehidden')?.includes('toolbar') ||
document.documentElement.getAttribute('chromehidden')?.includes('menubar')
);
}
return this._enabled;