Closed adrianolek closed 3 years ago
Would you like to send a Pull Request to address this issue? Remember to add unit tests.
@mcollina I've opened PR https://github.com/davidmarkclements/fast-redact/pull/38 to address this issue, with the test case already created by @adrianolek.
When the first call has the redacted property value equal the
censor
value, then subsequent calls will not restore the redacted property in the original object.I've created a test case, please have a look:
https://github.com/adrianolek/fast-redact/blob/first-call-precensored/test/index.js#L292
Started in https://github.com/pinojs/pino/issues/919