Skip to content

Updated __proto__ #63

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

Closed
SteeveGL opened this issue Apr 23, 2021 · 4 comments
Closed

Updated __proto__ #63

SteeveGL opened this issue Apr 23, 2021 · 4 comments

Comments

@SteeveGL
Copy link

SteeveGL commented Apr 23, 2021

I casting an object and I got an updated __proto__

const customerDiff: any = detailedDiff(this.customer, this.form.value as Customer);
{
  __proto__:Object {...}
}

Can I ignore it?

@anko
Copy link
Contributor

anko commented Apr 26, 2021

All properties present in the diff come from the input objects; to this module, __proto__ is just another property. It must have been set by some other code.

@papb
Copy link

papb commented Apr 27, 2021

Can you post the results of the following?

Object.prototype.hasOwnProperty.call(this.customer, '__proto__')
Object.prototype.hasOwnProperty.call(this.form.value, '__proto__')
Object.prototype.hasOwnProperty.call(customerDiff, '__proto__')

@SteeveGL
Copy link
Author

console.log('this.customer', Object.prototype.hasOwnProperty.call(this.customer, '__proto__'));
console.log('this.form.value', Object.prototype.hasOwnProperty.call(this.form.value, '__proto__'));
console.log('customerDiff', Object.prototype.hasOwnProperty.call(customerDiff, '__proto__'));
this.customer false
this.form.value false
customerDiff false

@mattphillips
Copy link
Owner

Going to close as I can't reproduce this myself but feel free to re-open or to share more details to repro the error.

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

4 participants