We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b73ca6 commit e2f93efCopy full SHA for e2f93ef
1 file changed
packages/common/pipes/validation.pipe.ts
@@ -94,11 +94,10 @@ export class ValidationPipe implements PipeTransform<any> {
94
}
95
96
private stripProtoKeys(value: Record<string, any>) {
97
- if (isNil(value)) { return; }
98
delete value.__proto__;
99
const keys = Object.keys(value);
100
keys
101
- .filter(key => typeof value[key] === 'object')
+ .filter(key => typeof value[key] === 'object' && value[key])
102
.forEach(key => this.stripProtoKeys(value[key]));
103
104
0 commit comments