Fix to ignore storyboard instantiation with blank id, refactoring on another branch

This commit is contained in:
Gregory John Casamento 2025-05-12 19:22:08 -04:00
parent 7850f8e61b
commit e97aee7bca

View file

@ -164,19 +164,17 @@ static NSStoryboard *__mainStoryboard = nil;
- (id) instantiateControllerWithIdentifier: (NSStoryboardSceneIdentifier)identifier - (id) instantiateControllerWithIdentifier: (NSStoryboardSceneIdentifier)identifier
{ {
if (identifier != nil)
{
return [self instantiateControllerWithIdentifier: identifier return [self instantiateControllerWithIdentifier: identifier
creator: nil]; creator: nil];
}
return nil;
} }
- (id) instantiateControllerWithIdentifier: (NSStoryboardSceneIdentifier)identifier - (id) instantiateControllerWithIdentifier: (NSStoryboardSceneIdentifier)identifier
creator: (NSStoryboardControllerCreator)block creator: (NSStoryboardControllerCreator)block
{ {
id result = nil; id result = nil;
if (identifier != nil)
{
NSMutableArray *topLevelObjects = [NSMutableArray arrayWithCapacity: 5]; NSMutableArray *topLevelObjects = [NSMutableArray arrayWithCapacity: 5];
NSDictionary *table = [NSDictionary dictionaryWithObjectsAndKeys: topLevelObjects, NSDictionary *table = [NSDictionary dictionaryWithObjectsAndKeys: topLevelObjects,
NSNibTopLevelObjects, NSNibTopLevelObjects,
@ -265,6 +263,8 @@ static NSStoryboard *__mainStoryboard = nil;
{ {
CALL_BLOCK(block, self); CALL_BLOCK(block, self);
} }
}
return result; return result;
} }
@end @end