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

Why clone the this.target object? #73

Open
greduan opened this issue Jul 7, 2016 · 0 comments
Open

Why clone the this.target object? #73

greduan opened this issue Jul 7, 2016 · 0 comments

Comments

@greduan
Copy link

greduan commented Jul 7, 2016

https://github.com/tgriesser/checkit/blame/master/core.js#L121

That line is causing issues for a project I'm working on, because we need this.target to retain its properties that it inherits through prototype, but they're being lost by that one line.

Is there a reason why you're cloning it?

Here's some pics of the problem:

Here I'm highlighting the object we want as this.target in the validation:

screen shot 2016-07-07 at 16 43 42

But then over here, because of the clone that __proto__ information gets lost and this.target is no longer the same object.

screen shot 2016-07-07 at 16 43 45

Is there a reason why you decided to do that clone there?

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

1 participant