Skip to content

Commit 14c9c44

Browse files
committed
Update schema.js
1 parent 6336ed6 commit 14c9c44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/schema.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ Schema.prototype._clone = function _clone(Constructor) {
414414
s.tree = clone(this.tree);
415415
// recursion is triggered here
416416
s.paths = Object.fromEntries(
417-
Object.entries(this.paths).map(([key, value]) => ([key, value]))
417+
Object.entries(this.paths).map(([key, value]) => ([key, value.$isSingleNested ? value.clone() : value]))
418418
);
419419
s.nested = clone(this.nested);
420420
s.subpaths = clone(this.subpaths);

0 commit comments

Comments
 (0)