-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.
Description
- Version: v11.4.0
- Platform: Windows 10.0.17134, 64-bit
- Subsystem: don't know
Code to reproduce the issue:
const workspace = JSON.parse('{"orgContentScore":{"41":{"id":"41","contentId":"111","competenceId":"40","scoreTypeId":"6","value":0.25}}}');
const selectedObject = Object.values(workspace.orgContentScore).filter(ocs => ocs.contentId === '111').find(ocs => ocs.competenceId === '40');
console.log(selectedObject.value, 0.25); // Note: not mutated (yet)
console.log({...selectedObject, value: 0.9}.value, 0.9); // Note: This mutates selectedObject on node@11 but not on node@10
console.log(selectedObject.value, 0.25); // Note: selected objects is now mutated!!
On node@11 this outputs this unexpected result:
0.25 0.25
0.9 0.9
0.9 0.25
Where on node@10, it outputs the expected result:
0.25 0.25
0.9 0.9
0.25 0.25
according to my understanding of the description on MDN:
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.