You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The oncreate function is successfully called for each <Top> component, and component.get('top') is correct
Next comes bindings. The first binding is created (for the final component, because the order shouldn't really matter here), and that causes component._set(...) to happen (component being App.html in this case), which triggers an update of the main fragment, which causes top to become undefined for the remaining <Top> components, because their bindings haven't been initialised yet so idToTop is incomplete
By the time the second and third bindings are initialised, the differs check returns false, because the value of top is undefined, which means the observer is not initialised.
So somehow we need to prevent the _set from causing the update. If we can figure that out, then we'll also be saving some unnecessary work from happening (the top-level component could update just once, instead of three times).
Answers on a postcard...
The text was updated successfully, but these errors were encountered:
Another wild bug courtesy of @TehShrike. Repro here.
Essentially what happens is this:
oncreate
function is successfully called for each<Top>
component, andcomponent.get('top')
is correctcomponent._set(...)
to happen (component
beingApp.html
in this case), which triggers anupdate
of the main fragment, which causestop
to becomeundefined
for the remaining<Top>
components, because their bindings haven't been initialised yet soidToTop
is incompletediffers
check returns false, because the value oftop
isundefined
, which means the observer is not initialised.So somehow we need to prevent the
_set
from causing theupdate
. If we can figure that out, then we'll also be saving some unnecessary work from happening (the top-level component couldupdate
just once, instead of three times).Answers on a postcard...
The text was updated successfully, but these errors were encountered: