Skip to content

Commit 7481858

Browse files
committed
Notify light tree item correctly
1 parent 3262233 commit 7481858

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

webextensions/common/tst-api.js

+10-4
Original file line numberDiff line numberDiff line change
@@ -326,14 +326,15 @@ export async function exportTabInternal(sourceTab, { addonId, light, isContextTa
326326
const tabStates = sourceTab.$TST.states;
327327
const exportedTab = {
328328
id: sourceTab.id,
329+
windowId: sourceTab.windowId,
329330
states: Constants.kTAB_SAFE_STATES_ARRAY.filter(state => tabStates.has(state)),
330331
indent: parseInt(sourceTab.$TST.getAttribute(Constants.kLEVEL) || 0),
331332
children,
332333
ancestorTabIds: sourceTab.$TST.ancestorIds,
333334
bundledTabId: sourceTab.$TST.bundledTabId,
334335
};
335336
if (light)
336-
return exportTab;
337+
return exportedTab;
337338

338339
const allowedProperties = new Set([
339340
// basic tabs.Tab properties
@@ -360,7 +361,7 @@ export async function exportTabInternal(sourceTab, { addonId, light, isContextTa
360361
'status',
361362
'successorId',
362363
'width',
363-
'windowId',
364+
//'windowId',
364365
]);
365366

366367
if (permissions.has(kPERMISSION_TABS) ||
@@ -1275,12 +1276,17 @@ async function sanitizeMessage(message, { addonId, tabProperties, cache, isConte
12751276
light: !!addon.lightTree,
12761277
cache,
12771278
isContextTab,
1278-
})))
1279+
})));
12791280
sanitizedProperties[name] = tabs.filter(tab => !!tab);
12801281
})(treeItem));
12811282
else
12821283
tasks.push((async () => {
1283-
sanitizedProperties[name] = await exportTab(treeItem, { addonId: addon.id, cache, isContextTab });
1284+
sanitizedProperties[name] = await exportTab(treeItem, {
1285+
addonId: addon.id,
1286+
light: !!addon.lightTree,
1287+
cache,
1288+
isContextTab,
1289+
});
12841290
})());
12851291
}
12861292
}

0 commit comments

Comments
 (0)