Don't propagate bad site data from uwserver to extension popup

This commit is contained in:
Tamius Han 2025-03-30 01:24:37 +01:00
parent f93a7e284c
commit 39fdd72e9f

View File

@ -276,11 +276,20 @@ export default class UWServer {
}
async getCurrentSite() {
const site = await this.getVideoTab();
// Don't propagate 'INVALID SITE' to the popup.
if (site.host === 'INVALID SITE') {
return;
}
const tabHostname = await this.getCurrentTabHostname();
this.eventBus.send(
'set-current-site',
{
site: await this.getVideoTab(),
tabHostname: await this.getCurrentTabHostname(),
site,
tabHostname,
},
{
comms: {