Skip to content

Commit

Permalink
Merge pull request #14606 from andrews05/fix/virtuals-fast-path
Browse files Browse the repository at this point in the history
Pass options to `clone` instead of `get` in applyVirtuals.
  • Loading branch information
vkarpov15 authored May 24, 2024
2 parents 2a8c532 + 5291007 commit 53362c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -4146,7 +4146,7 @@ function applyVirtuals(self, json, options, toObjectOptions) {
assignPath = path.substring(options.path.length + 1);
}
if (assignPath.indexOf('.') === -1 && assignPath === path) {
v = clone(self.get(path, options ? { ...options, noDottedPath: true } : { noDottedPath: true }));
v = clone(self.get(path, { noDottedPath: true }), options);
if (v === void 0) {
continue;
}
Expand Down

0 comments on commit 53362c3

Please sign in to comment.