davidmarkclements / fast-redact

very fast object redaction
MIT License
284 stars 30 forks source link

Fix for TypeError when redact called with leading wildcard and null property #14

Closed n4zukker closed 5 years ago

n4zukker commented 5 years ago

This change set includes a test which illustrates the problem and a suggested fix.

To recap:

Problem is that: path such as ['*.password'] gives a type error when redacting an object with a null property, {foo: null}.

Reason: a variable was missing an initial value in its declaration

n4zukker commented 5 years ago

Hi. Would someone kindly merge this PR or let me know what needs to be done to have it merged. Thank you.

n4zukker commented 5 years ago

Thank you