superstruct icon indicating copy to clipboard operation
superstruct copied to clipboard

Allow frozen objects/arrays to be coerced

Open arturmuller opened this issue 3 years ago • 0 comments

The Bug

The issue was the mutation of the input object/array while coercing entries inside the run util -- combined with a missing custom coercer which would clone its input (exactly as @gwisp2 suggested in #1096).

Apart from record, tuple was also affected by the same potential issue.

PR Changes

  1. Added coercer that clones its input to record and tuple.
  2. Added tests with frozen objects for all structs which could potentially be affected (object/array based and include entries).

Resolves #1096

arturmuller avatar Nov 20 '22 14:11 arturmuller