Attempt to fix a problem where previous page request influenced the score of the new page
This commit is contained in:
parent
d512e3cede
commit
6e062f92d7
|
@ -117,9 +117,10 @@ export default class ExtendedRequest {
|
||||||
|
|
||||||
async cacheOrigin(): Promise<void> {
|
async cacheOrigin(): Promise<void> {
|
||||||
let url: string;
|
let url: string;
|
||||||
if (this.data.tabId && this.data.tabId >= 0) {
|
if (this.data.type === 'main_frame') {
|
||||||
const tab = await browser.tabs.get(this.data.tabId);
|
url = this.data.url;
|
||||||
url = tab.url;
|
} else if (this.data.originUrl) {
|
||||||
|
url = this.data.originUrl;
|
||||||
} else if (
|
} else if (
|
||||||
(this.data as any)?.frameAncestors &&
|
(this.data as any)?.frameAncestors &&
|
||||||
(this.data as any).frameAncestors[0] !== undefined
|
(this.data as any).frameAncestors[0] !== undefined
|
||||||
|
|
Loading…
Reference in New Issue
Block a user