Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'toString' field removed from cloned object #105

Open
assafey opened this issue May 26, 2019 · 3 comments
Open

'toString' field removed from cloned object #105

assafey opened this issue May 26, 2019 · 3 comments

Comments

@assafey
Copy link

assafey commented May 26, 2019

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.

@rictic
Copy link
Contributor

rictic commented May 31, 2019

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

@assafey
Copy link
Author

assafey commented Jun 1, 2019

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

@JacobMisirian
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants