Each path type (static, group, nested) uses an isolated way
of storing and restoring values on the original object.
In case of a property that matches multiple redaction paths,
this isolation leads to loss of information as it fails to restore the
original value on the original mutated object.
The issue
Each path type (static, group, nested) uses an isolated way of storing and restoring values on the original object.
In case of a property that matches multiple redaction paths, this isolation leads to loss of information as it fails to restore the original value on the original mutated object.
The issue can be reproduced with the following:
In this example
x.b
would match both the staticx.b
path and the wildcard*.b
path leading in the original object being restored as:I prepared #34 that resolves this issue. Haven't checked the performance impact yet but will do asap.