From 5291007ed088bda63ec4d7b28e2ac91b5c07b96e Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 20 May 2024 13:45:46 +1200 Subject: [PATCH] Pass options to `clone` instead of `get` in applyVirtuals. --- lib/document.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/document.js b/lib/document.js index 264a94a6684..b76aece76f6 100644 --- a/lib/document.js +++ b/lib/document.js @@ -4128,7 +4128,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; }