Skip to content

Commit

Permalink
clead data call made recursive (ToolJet#3133)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmithun4 authored May 26, 2022
1 parent b05ea81 commit 3fac991
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/packages/common/lib/utils.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ export function cleanSensitiveData(data, keys) {
}

function clearData(data, keys) {
if (!data || typeof data !== 'object') return;

for (const key in data) {
if (keys.includes(key)) {
delete data[key];
} else {
cleanSensitiveData(data[key], keys);
clearData(data[key], keys);
}
}
}

0 comments on commit 3fac991

Please sign in to comment.