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
While looking at the target setter for nodes, it seemed odd that we were
making affordances for sometimes setting a promise as the target. After
unraveling the code, it turns out this is impossible outside of tests,
where we set environment variables to mimic that state. We were always
awaiting the generation of links/nodes where appropriate. This commit
inlines some code and cleans it up to the point where this fact could be
verified, and then removes the now unneeded logic in loadActual that was
trying to account for this. loadActual, an async function, now returns
a promise that resolves to the tree, as a singleton. This maintains the
use case commented on where buildIdealTree and reify can happen in
parallel.
This fixes a potential bug in reify (and likely others) which pass
around this.idealTree as an object, and NOT a promise, even though
before this refactor it can sometimes be a promise.
0 commit comments