Skip to content

Commit

Permalink
fix: some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
forsti0506 committed Feb 25, 2021
1 parent 80c7d99 commit 79d0b47
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions lib/utils/result-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,8 @@ export function setResult(
if (violations.filter((v) => v.id === violation.id).length > 0) {
const reportViolation = violations.filter((v) => v.id === violation.id)[0];
for (const node of violation.nodes) {
if (
reportViolation.nodes.filter(
(v) =>
v.targetResult.target.length === node.target.length &&
v.targetResult.target.every((value, index) => value === node.target[index]),
).length > 0
) {
reportViolation.nodes
.filter(
(v) =>
v.targetResult.target.length === node.target.length &&
v.targetResult.target.every((value, index) => value === node.target[index]),
)[0]
.targetResult.urls.push(result.url);
if (reportViolation.nodes.filter((v) => v.html === node.html).length > 0) {
reportViolation.nodes.filter((v) => v.html === node.html)[0].targetResult.urls.push(result.url);
} else {
reportViolation.nodes.push({
none: node.none,
Expand Down

0 comments on commit 79d0b47

Please sign in to comment.