Skip to content

Commit

Permalink
Fix indent
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed May 23, 2024
1 parent 7259402 commit e583146
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions webextensions/sidebar/sidebar-tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,26 +363,26 @@ export function unrenderTab(tab) {
const hasExternalListener = TSTAPI.hasListenerForMessageType(TSTAPI.kNOTIFY_TABS_UNRENDERED);
if (hasInternalListener || hasExternalListener) {
if (!unrenderTab.invoked) {
unrenderTab.invoked = true;
window.requestAnimationFrame(() => {
unrenderTab.invoked = false;

const ids = [...mUnrenderedTabIds];
mUnrenderedTabIds.clear();
const tabs = mapAndFilter(ids, id => Tab.get(id));

if (hasInternalListener)
onTabsUnrendered.dispatch(tabs);

if (hasExternalListener) {
let cache = {};
TSTAPI.broadcastMessage({
type: TSTAPI.kNOTIFY_TABS_UNRENDERED,
tabs,
}, { tabProperties: ['tabs'], cache }).catch(_error => {});
cache = null;
}
});
unrenderTab.invoked = true;
window.requestAnimationFrame(() => {
unrenderTab.invoked = false;

const ids = [...mUnrenderedTabIds];
mUnrenderedTabIds.clear();
const tabs = mapAndFilter(ids, id => Tab.get(id));

if (hasInternalListener)
onTabsUnrendered.dispatch(tabs);

if (hasExternalListener) {
let cache = {};
TSTAPI.broadcastMessage({
type: TSTAPI.kNOTIFY_TABS_UNRENDERED,
tabs,
}, { tabProperties: ['tabs'], cache }).catch(_error => {});
cache = null;
}
});
}
}
else {
Expand Down

0 comments on commit e583146

Please sign in to comment.