Fix regresion from #2265 causing an extra default artboard to show up
This commit is contained in:
parent
b171eeba84
commit
22a900b35e
|
|
@ -595,7 +595,9 @@ impl MessageHandler<PortfolioMessage, PortfolioMessageData<'_>> 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;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -118,10 +118,16 @@ impl<T> Instances<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: Default + Hash> Default for Instances<T> {
|
||||
impl<T: Default + Hash + 'static> Default for Instances<T> {
|
||||
fn default() -> Self {
|
||||
use core::any::TypeId;
|
||||
if TypeId::of::<T>() == TypeId::of::<crate::Artboard>() {
|
||||
// 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())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Hash> core::hash::Hash for Instances<T> {
|
||||
|
|
|
|||
Loading…
Reference in New Issue