mirror of
https://github.com/bitwarden/browser
synced 2026-02-10 13:40:06 +00:00
Account for no responses.
This commit is contained in:
@@ -15,11 +15,17 @@ if (document.readyState === "loading") {
|
||||
async function loadPhishingDetectionContent() {
|
||||
const activeUrl = PhishingDetectionBrowserService.getActiveUrl();
|
||||
|
||||
const { isPhishingDomain } = await chrome.runtime.sendMessage({
|
||||
const response = await chrome.runtime.sendMessage({
|
||||
command: PhishingDetectionCommands.CheckUrl,
|
||||
activeUrl,
|
||||
});
|
||||
|
||||
if (!response) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { isPhishingDomain } = response;
|
||||
|
||||
if (isPhishingDomain) {
|
||||
const url = new URL(activeUrl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user