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

Suggested fix to broken attr behaviour #671

Merged
merged 1 commit into from Jan 23, 2014
Merged

Conversation

robpre
Copy link
Contributor

@robpre robpre commented Jan 16, 2014

This is my fix for the bug/inconsistency mentioned in #667

@daffl
Copy link
Contributor

daffl commented Jan 16, 2014

This actually looks pretty good for 2.0.5 and doesn't seem to interfere with anything else.

/cc @justinbmeyer, @thecountofzero

@justinbmeyer
Copy link
Contributor

Actually, I wasn't aware this code existed in the first place. It performs double reads for every attr call with a ".".

#257 and #269 and this commit are related: a80bd62

I'm not sure what to do as I'd prefer not to do double reads.

@andykant
Copy link
Contributor

If there is a double read I think it's worthwhile for the consistency, although in my testing the amount of lookups in both cases was roughly the same.

Optimally you wouldn't have data organized like this in cases where the performance was an issue.

andykant added a commit that referenced this pull request Jan 23, 2014
Suggested fix to broken attr behaviour
@andykant andykant merged commit 4544579 into canjs:master Jan 23, 2014
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

Successfully merging this pull request may close these issues.

None yet

4 participants