Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Some variables in ternary operator are not updating display. #40

Closed
mysticatea opened this issue Jul 22, 2014 · 2 comments · Fixed by #41
Closed

Some variables in ternary operator are not updating display. #40

mysticatea opened this issue Jul 22, 2014 · 2 comments · Fixed by #41

Comments

@mysticatea
Copy link

Repro code: https://dl.dropboxusercontent.com/u/5739705/polymer/ternary/test.html

I think that the hidden term at first time has been not observed its value.
The hidden term: It's the third term if the first term is truthy. Otherwise, it's the second term.

@arv
Copy link
Contributor

arv commented Jul 22, 2014

When I extract this into a test it works. I suspect that it is an issue with using select as a property name since that clashes with the builtin select method.

@arv
Copy link
Contributor

arv commented Jul 22, 2014

Scratch that... I can reproduce this. Trying to figure out what is going wrong

arv added a commit to arv/polymer-expressions that referenced this issue Jul 22, 2014
For conditionals we failed to setup the observer for both branches
as required. This lead to us only observing either the true or false
branch but not both.

Fixes googlearchive#40
arv added a commit to arv/polymer-expressions that referenced this issue Jul 22, 2014
For conditionals we failed to setup the observer for both branches
as required. This lead to us only observing either the true or false
branch but not both.

Now we mark conditional (as well as || and &&) as dynamicDeps so the
dependencies gets reevaluated as needed.

Fixes googlearchive#40
@arv arv closed this as completed in #41 Jul 22, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants