Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(clone): correct clone reference issue
Fixed an issue which would set a reference between the cloned object and the orginal when an object had a value of another object. Example: ``` const obj1 = { a: { b: 1 } }; const obj2 = clone(a); obj2.a.b = 2; console.log(obj1); // => { a: { b: 2 } } console.log(obj2); // => { a: { b: 2 } } ``` After fix: ``` console.log(obj1); // => { a: { b: 1 } } console.log(obj2); // => { a: { b: 2 } } ```
- Loading branch information