From 2bc3435b33a916b03378e58927f4f2005ea9ddbb Mon Sep 17 00:00:00 2001 From: brendanjbond Date: Mon, 25 Mar 2024 14:01:08 +0000 Subject: [PATCH] fix scope --- src/process/clearHidden.ts | 3 +++ 1 file changed, 3 insertions(+) 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;