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

$eval incorrectly renders boolean values when there's an error #12089

Closed
SomeKittens opened this issue Jun 11, 2015 · 3 comments
Closed

$eval incorrectly renders boolean values when there's an error #12089

SomeKittens opened this issue Jun 11, 2015 · 3 comments

Comments

@SomeKittens
Copy link
Member

In 1.4.0, with a.b being undefined (thus triggering an error):

{{ true && a.b.c }} => 'true'
{{ false || a.b.c }} => 'false'

Plunkr: http://plnkr.co/edit/Z0OYWcLgqEa0Hil9RyGd?p=preview

This works as expected in 1.3.15: http://plnkr.co/edit/WQ15uAjNYdKEmpeQwvQT?p=preview

@SomeKittens
Copy link
Member Author

What's especially troubling is the first case (resulting in true) as this caused all sorts of havoc with our ng-if and ng-show statements.

@steelstyle
Copy link

Seems that is is also order dependent

http://plnkr.co/edit/p2J36xikdG9iA6vJw0Bk?p=preview

@gkalpak
Copy link
Member

gkalpak commented Jun 11, 2015

Closing as duplicate of #11959.
(This has been fixed on master by #11989 and the fix will be available in v1.4.1.)

@gkalpak gkalpak closed this as completed Jun 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants