Skip to content

Commit 53362c3

Browse files
authored
Merge pull request #14606 from andrews05/fix/virtuals-fast-path
Pass options to `clone` instead of `get` in applyVirtuals.
2 parents 2a8c532 + 5291007 commit 53362c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/document.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4146,7 +4146,7 @@ function applyVirtuals(self, json, options, toObjectOptions) {
41464146
assignPath = path.substring(options.path.length + 1);
41474147
}
41484148
if (assignPath.indexOf('.') === -1 && assignPath === path) {
4149-
v = clone(self.get(path, options ? { ...options, noDottedPath: true } : { noDottedPath: true }));
4149+
v = clone(self.get(path, { noDottedPath: true }), options);
41504150
if (v === void 0) {
41514151
continue;
41524152
}

0 commit comments

Comments
 (0)