1
0
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:
Jimmy Vo
2025-03-19 13:29:37 -04:00
parent 64c01e57b2
commit b5895920bf

View File

@@ -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);