diff --git a/editor/src/messages/portfolio/portfolio_message_handler.rs b/editor/src/messages/portfolio/portfolio_message_handler.rs index b8a2cc7a..ee8b8c48 100644 --- a/editor/src/messages/portfolio/portfolio_message_handler.rs +++ b/editor/src/messages/portfolio/portfolio_message_handler.rs @@ -595,7 +595,9 @@ impl MessageHandler> for PortfolioMes }; let Some(ref reference) = node_metadata.persistent_metadata.reference.clone() else { - log::error!("could not get reference in deserialize_document"); + // TODO: Investigate if this should be an expected case, because currently it runs hundreds of times normally. + // TODO: Either delete the commented out error below if this is normal, or fix the underlying issue if this is not expected. + // log::error!("could not get reference in deserialize_document"); continue; }; diff --git a/node-graph/gcore/src/instances.rs b/node-graph/gcore/src/instances.rs index 6bd232cc..bb7f0f47 100644 --- a/node-graph/gcore/src/instances.rs +++ b/node-graph/gcore/src/instances.rs @@ -118,9 +118,15 @@ impl Instances { } } -impl Default for Instances { +impl Default for Instances { fn default() -> Self { - Self::new(T::default()) + use core::any::TypeId; + if TypeId::of::() == TypeId::of::() { + // TODO: Remove the 'static trait bound when this special casing is removed by making all types return empty + Self::empty() + } else { + Self::new(T::default()) + } } }