Closed gliechtenstein closed 7 years ago
Initialize parent node before children.
This should fix the problem mentioned here https://github.com/intercellular/cell/issues/155
Previously $init was being called from the bottom up. So if the tree structure looked like:
$init
A - B - C - D
The $init() execution order was:
$init()
because it was depth first search based. (See demo: https://jsfiddle.net/bnLw8htg/1/)
With this update now the order will be
(See demo: https://jsfiddle.net/bnLw8htg/2/)
Coverage remained the same at 84.04% when pulling 8894074f70da7756c8fce59231403ed5d7dc5f91 on senior_before_junior into 9ce2d50e447c2a6a4ead7480b93007bf25ff79b2 on develop.
Initialize parent node before children.
This should fix the problem mentioned here https://github.com/intercellular/cell/issues/155
Previously
$init
was being called from the bottom up. So if the tree structure looked like:The
$init()
execution order was:because it was depth first search based. (See demo: https://jsfiddle.net/bnLw8htg/1/)
With this update now the order will be
(See demo: https://jsfiddle.net/bnLw8htg/2/)