Skip to content

Commit

Permalink
Merge pull request #141 from formio/FIO-8886
Browse files Browse the repository at this point in the history
FIO-8885 & FIO-8886: use strict equality check for conditional component paths rather than Array.prototype.includes
  • Loading branch information
lane-formio authored Aug 27, 2024
2 parents 7e9678d + e0fcbf1 commit 33b09f5
Show file tree
Hide file tree
Showing 4 changed files with 626 additions and 120 deletions.
2 changes: 1 addition & 1 deletion src/process/clearHidden.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const clearHiddenProcess: ProcessorFnSync<ClearHiddenScope> = (context) =

// Check if there's a conditional set for the component and if it's marked as conditionally hidden
const isConditionallyHidden = (scope as ConditionsScope).conditionals?.find((cond) => {
return path.includes(cond.path) && cond.conditionallyHidden;
return path === cond.path && cond.conditionallyHidden;
});

const shouldClearValueWhenHidden = !component.hasOwnProperty('clearOnHide') || component.clearOnHide;
Expand Down
Loading

0 comments on commit 33b09f5

Please sign in to comment.