Skip to content

Commit

Permalink
Removed unnecessary conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
tleef42 committed Aug 19, 2023
1 parent 4fb34c4 commit ae2e210
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,8 @@ class AttackFlowValidator extends DiagramValidator {
case "file":
const hash = node.props.value.get("hashes");
const name = node.props.value.get("name");
if(!hash?.isDefined() || !name?.isDefined()) {
if(!hash?.isDefined() && !name?.isDefined()) {
this.addError(id, "File requires one of the following properties: Hashes, Name");
}
if(!hash?.isDefined() && !name?.isDefined()) {
this.addError(id, "File requires one of the following properties: Hashes, Name");
}
break;
case "grouping":
Expand Down

0 comments on commit ae2e210

Please sign in to comment.