Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

fix($parse): do not use locals on field access #5862

Closed
wants to merge 1 commit into from

Conversation

lgalfaso
Copy link
Contributor

Do not use the locals when performing a field access

Closes #5838

Do not use the locals when performing a field access

Closes angular#5838
@caitp
Copy link
Contributor

caitp commented Jan 17, 2014

I'm impressed that this was an issue for so long with nobody noticing it! This change gets an r+ from me, but I think it will have to wait until the weekend or next week to be merged. Good work! (oh, sounds like it might get another review later today as well)

Be sure to dog-food it before then just to make sure there isn't anything being missed by your test suite, but the fact that it's passing everything looks good =)

LGTM

@@ -938,6 +940,13 @@ describe('parser', function() {
expect($parse('a.b')({a: {b: 0}}, {a: null})).toEqual(undefined);
expect($parse('a.b.c')({a: null}, {a: {b: {c: 1}}})).toEqual(1);
}));

it('should use context resolution', inject(function($parse) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it('should not use locals to resolve object fields',....

@IgorMinar
Copy link
Contributor

otherwise looks great.

thanks @lgalfaso !!!

@caitp caitp closed this in 2068d76 Jan 22, 2014
caitp pushed a commit that referenced this pull request Jan 22, 2014
Do not use the locals when performing a field access in an angular expression.

Closes #5838
Closes #5862
@caitp
Copy link
Contributor

caitp commented Jan 22, 2014

Thanks a bunch, good work :)

@IgorMinar
Copy link
Contributor

@lgalfaso it seems that we haven't sent you a t-shirt yet. we really value your contributions (this one and the others in the past). please fill out this form and we'll send you an AngularJS t-shirt: http://goo.gl/075Sj

@lgalfaso
Copy link
Contributor Author

@IgorMinar Thanks

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

Successfully merging this pull request may close these issues.

$eval array expression with locals returns wrong
3 participants