Skip to content

Commit

Permalink
use strict equality check for conditional component paths rather than…
Browse files Browse the repository at this point in the history
… Array.prototype.includes
  • Loading branch information
brendanbond committed Aug 22, 2024
1 parent 6c3ff4d commit e037a25
Show file tree
Hide file tree
Showing 3 changed files with 630 additions and 124 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 e037a25

Please sign in to comment.