clone icon indicating copy to clipboard operation
clone copied to clipboard

'toString' field removed from cloned object

Open assafey opened this issue 6 years ago • 3 comments

Cloning an object that includes field 'toString' will have the following affect: before clone:

[ { a: 'aaa', toString: 'bbb' }, { a: 'ccc', toString: 'ddd' } ]

after clone:

[ { a: 'aaa' }, { a: 'ccc' } ]

'toString' field is removed from cloned object.

assafey avatar May 26 '19 10:05 assafey

Could use hasOwnProperty to tell if a field from Object is being overwritten on the clonee.

rictic avatar May 31 '19 21:05 rictic

@rictic not sure I’m following you. Is it a workaround?

assafey avatar Jun 01 '19 09:06 assafey

Bump on this, this issue is hanging me up on the development of my programming language.

JacobMisirian avatar Aug 11 '19 18:08 JacobMisirian