diff --git a/src/process/clearHidden.ts b/src/process/clearHidden.ts index 8a6189b1..33a3e268 100644 --- a/src/process/clearHidden.ts +++ b/src/process/clearHidden.ts @@ -17,6 +17,9 @@ type ClearHiddenScope = ProcessorScope & { */ export const clearHiddenProcess: ProcessorFnSync = (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;