Skip to content
Snippets Groups Projects
Commit a3c4662b authored by Alvaro Cabrera Durán's avatar Alvaro Cabrera Durán
Browse files

Clone input before traversing to avoid unwanted mutations; fix #473

parent e72a1a80
Branches
No related tags found
No related merge requests found
...@@ -83,7 +83,7 @@ function resolve(obj, data, values, property) { ...@@ -83,7 +83,7 @@ function resolve(obj, data, values, property) {
// TODO provide types // TODO provide types
function run(refs, schema, container) { function run(refs, schema, container) {
try { try {
const result = traverse(schema, [], function reduce(sub, maxReduceDepth, parentSchemaPath) { const result = traverse(utils.merge({}, schema), [], function reduce(sub, maxReduceDepth, parentSchemaPath) {
if (typeof maxReduceDepth === 'undefined') { if (typeof maxReduceDepth === 'undefined') {
maxReduceDepth = random.number(1, 3); maxReduceDepth = random.number(1, 3);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment