*Abort if theres no page url
This commit is contained in:
parent
c7589158d2
commit
e6f32a41c3
|
@ -21,6 +21,9 @@ export default function setup(engine: WebEngine) {
|
||||||
});
|
});
|
||||||
|
|
||||||
browser.menus.onShown.addListener((details: Menus.OnShownInfoType) => {
|
browser.menus.onShown.addListener((details: Menus.OnShownInfoType) => {
|
||||||
|
if (!details.pageUrl) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const provider = engine.getDomainContentProvider(
|
const provider = engine.getDomainContentProvider(
|
||||||
new URL(details.pageUrl as string).hostname
|
new URL(details.pageUrl as string).hostname
|
||||||
);
|
);
|
||||||
|
|
Reference in New Issue