Don't propagate bad site data from uwserver to extension popup
This commit is contained in:
parent
f93a7e284c
commit
39fdd72e9f
@ -276,11 +276,20 @@ export default class UWServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getCurrentSite() {
|
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(
|
this.eventBus.send(
|
||||||
'set-current-site',
|
'set-current-site',
|
||||||
{
|
{
|
||||||
site: await this.getVideoTab(),
|
site,
|
||||||
tabHostname: await this.getCurrentTabHostname(),
|
tabHostname,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
comms: {
|
comms: {
|
||||||
|
Loading…
Reference in New Issue
Block a user