mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-11 17:41:03 +01:00
Fix typo which could lead to improper filtering context
Related discussion:
- 354ac4f57b (commitcomment-32715209)
This commit is contained in:
parent
875542c964
commit
580c3885df
1 changed files with 7 additions and 4 deletions
|
@ -76,18 +76,21 @@
|
|||
} else if ( details.documentUrl !== undefined ) {
|
||||
this.setDocOriginFromURL(details.documentUrl);
|
||||
} else {
|
||||
const pageStore = µBlock.pageStoreFromTabId(this.docId);
|
||||
const pageStore = µBlock.pageStoreFromTabId(this.tabId);
|
||||
const docStore = pageStore && pageStore.frames.get(this.docId);
|
||||
if ( docStore ) {
|
||||
this.docOrigin = undefined;
|
||||
this.docHostname = docStore.pageHostname;
|
||||
this.docDomain = docStore.pageDomain;
|
||||
} else {
|
||||
this.setDocOrigin(this.tabOrigin);
|
||||
}
|
||||
}
|
||||
} else if ( details.documentUrl !== undefined ) {
|
||||
const normalURL = µBlock.normalizePageURL(0, details.documentUrl);
|
||||
this.setTabOriginFromURL(normalURL);
|
||||
this.setDocOriginFromURL(normalURL);
|
||||
const origin = this.originFromURI(
|
||||
µBlock.normalizePageURL(0, details.documentUrl)
|
||||
);
|
||||
this.setDocOrigin(origin).setTabOrigin(origin);
|
||||
} else if ( this.type === 'sub_frame' ) {
|
||||
const origin = this.originFromURI(this.url);
|
||||
this.setDocOrigin(origin).setTabOrigin(origin);
|
||||
|
|
Loading…
Reference in a new issue