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() { get enabled() {
if (!this._enabled) { if (typeof this._enabled === 'undefined') {
this._enabled = !( this._enabled = !(
docElement.hasAttribute('privatebrowsingmode') || document.documentElement.hasAttribute('privatebrowsingmode') ||
docElement.getAttribute('chromehidden').includes('toolbar') || document.documentElement.getAttribute('chromehidden')?.includes('toolbar') ||
docElement.getAttribute('chromehidden').includes('menubar') document.documentElement.getAttribute('chromehidden')?.includes('menubar')
); );
} }
return this._enabled; return this._enabled;