Skip to content

Commit

Permalink
Merge pull request #94 from Lightning-Flow-Scanner/fix-inactive-flow-…
Browse files Browse the repository at this point in the history
…rule

fix: treat status as a flow attribute instead of element
  • Loading branch information
junners authored Jun 1, 2024
2 parents 8e6bf44 + 40bcdc2 commit 7095d9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/rules/InactiveFlow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ export class InactiveFlow extends RuleCommon implements core.IRuleDefinition {
const inactiveFlows = [];
for (const node of flow.elements) {
const nodeElementString = JSON.stringify(node.element);
if (node.subtype == "status" && nodeElementString != '"Active"') {
if (node.subtype == "status" && nodeElementString != '\"Active\"') {
inactiveFlows.push(node);
}
}
let results = [];
for (const det of inactiveFlows) {
results.push(new core.ResultDetails(det));
results.push(new core.ResultDetails(new core.FlowAttribute(JSON.stringify(det.element), det.subtype,"!= Active")));
}
return new core.RuleResult(this, results);
}
Expand Down

0 comments on commit 7095d9e

Please sign in to comment.