Skip to content

Commit

Permalink
fix scope
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanbond committed Mar 25, 2024
1 parent a56be82 commit 2bc3435
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/process/clearHidden.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ type ClearHiddenScope = ProcessorScope & {
*/
export const clearHiddenProcess: ProcessorFnSync<ClearHiddenScope> = (context) => {
const { component, data, path, value, scope } = context;
if (!scope.clearHidden) {
scope.clearHidden = {};
}
if (component.hidden && value !== undefined && (!component.hasOwnProperty('clearOnHide') || component.clearOnHide)) {
unset(data, path);
scope.clearHidden[path] = true;
Expand Down

0 comments on commit 2bc3435

Please sign in to comment.