fix(scenegraph): recurse through aliases

This commit is contained in:
Nova
2023-05-31 08:47:02 -04:00
parent f17b4c8ee2
commit f42c8963e7

View File

@@ -36,7 +36,7 @@ impl Scenegraph {
#[instrument(level = "debug", skip(self))]
pub fn get_node(&self, path: &str) -> Option<Arc<Node>> {
let mut node = self.nodes.get(path)?.clone();
if let Some(alias) = node.alias.get() {
while let Some(alias) = node.alias.get() {
node = alias.original.upgrade()?;
}
Some(node)