potential fix for an issue regarding undefined or null

This commit is contained in:
zefie
2024-05-17 14:18:20 -04:00
parent 8cf96ad5c2
commit 0a5a2eb964

View File

@@ -820,11 +820,13 @@ class WTVShared {
const passwordRegex = /(^pass$|passw(or)?d)/i;
let newobj = this.cloneObj(obj); // Clone the object once at the beginning
if (newobj.query) {
Object.keys(newobj.query).forEach((k) => {
if (passwordRegex.test(k)) {
newobj.query[k] = '*'.repeat(newobj.query[k].length);
}
});
}
return newobj;
}