Skip to content

Commit ebea53b

Browse files
committed
prevent crash by reloading data before expanding items
1 parent 24153c8 commit ebea53b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PBGitSidebarController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ - (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(
131131
[stashes addChildWithoutSort:item];
132132
lastItem = item;
133133
}
134+
[sourceView reloadData];
134135
if (lastItem) {
135136
[sourceView PBExpandItem:lastItem expandParents:YES];
136137
}
137-
[sourceView reloadData];
138138
} else if ([kObservingContextSubmodules isEqualToString:(__bridge NSString *)context]) {
139139
[submodules.children removeAllObjects];
140140
NSArray *newSubmodules = [change objectForKey:NSKeyValueChangeNewKey];

0 commit comments

Comments
 (0)