Fix exceptions on provider switch

This commit is contained in:
crschnick 2024-01-03 15:23:13 +00:00
parent d8b2c44489
commit 362cb12e20

View file

@ -223,6 +223,9 @@ public class GuiDsStoreCreator extends MultiStepComp.Step<CompStructure<?>> {
return provider.getValue() == null
|| store.getValue() == null
|| !store.getValue().isComplete()
// When switching providers, both observables change one after another.
// So temporarily there might be a store class mismatch
|| provider.getValue().getStoreClasses().stream().noneMatch(aClass -> aClass.isAssignableFrom(store.getValue().getClass()))
|| provider.getValue().createInsightsMarkdown(store.getValue()) == null;
},
provider,