Skip to content

Commit 1d3497d

Browse files
authored
Merge pull request #9 from Zacgoose/copilot/fix-guard-evaluation-issue
fix: remove redundant type guard and fix unused matchDetails assignment
2 parents d56e179 + 286dca6 commit 1d3497d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scripts/content.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3255,7 +3255,7 @@ if (window.checkExtensionLoaded) {
32553255
let cleanedSourceLength = null;
32563256
if (typeof arguments[1] === "object" && arguments[1]?.scanCleaned) {
32573257
// If scanCleaned is true, get cleaned page source length
3258-
const cleanedSource = typeof getPageSource === "function" ? getPageSource(true) : null;
3258+
const cleanedSource = getCleanPageSource();
32593259
cleanedSourceLength = cleanedSource ? cleanedSource.length : null;
32603260
logger.log(
32613261
`📄 Page info: ${document.querySelectorAll("*").length} elements, ${

scripts/modules/rules-engine-core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ function processPhishingIndicators(indicators, pageSource, pageText, url, option
361361
category: ind.category || "general",
362362
confidence: ind.confidence ?? 0.5,
363363
description: ind.description || "",
364-
matchDetails: snippet || matchedFrom || "",
364+
matchDetails: snippet || matchedFrom || matchDetails || "",
365365
};
366366
threats.push(threat);
367367

0 commit comments

Comments
 (0)