diff --git a/Source/ASCollectionNode.mm b/Source/ASCollectionNode.mm index 97bb2b8e9c..4e5fc30d05 100644 --- a/Source/ASCollectionNode.mm +++ b/Source/ASCollectionNode.mm @@ -519,7 +519,10 @@ - (void)waitUntilAllUpdatesAreCommitted { - [self.view waitUntilAllUpdatesAreCommitted]; + ASDisplayNodeAssertMainThread(); + if (self.nodeLoaded) { + [self.view waitUntilAllUpdatesAreCommitted]; + } } - (void)reloadDataWithCompletion:(void (^)())completion diff --git a/Source/ASTableNode.mm b/Source/ASTableNode.mm index 7ff5248a5f..b771744fec 100644 --- a/Source/ASTableNode.mm +++ b/Source/ASTableNode.mm @@ -653,7 +653,10 @@ ASLayoutElementCollectionTableSetTraitCollection(_environmentStateLock) - (void)waitUntilAllUpdatesAreCommitted { - [self.view waitUntilAllUpdatesAreCommitted]; + ASDisplayNodeAssertMainThread(); + if (self.nodeLoaded) { + [self.view waitUntilAllUpdatesAreCommitted]; + } } #pragma mark - Debugging (Private)