We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6336ed6 commit 14c9c44Copy full SHA for 14c9c44
lib/schema.js
@@ -414,7 +414,7 @@ Schema.prototype._clone = function _clone(Constructor) {
414
s.tree = clone(this.tree);
415
// recursion is triggered here
416
s.paths = Object.fromEntries(
417
- Object.entries(this.paths).map(([key, value]) => ([key, value]))
+ Object.entries(this.paths).map(([key, value]) => ([key, value.$isSingleNested ? value.clone() : value]))
418
);
419
s.nested = clone(this.nested);
420
s.subpaths = clone(this.subpaths);
0 commit comments