Skip to content

Commit bfb1047

Browse files
authored
Check if in a repository before rendering branch menu (#692)
This prevents the extension crashing when leaving a repo with the branch menu open.
1 parent 4c3dbe2 commit bfb1047

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/Toolbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export class Toolbar extends React.Component<IToolbarProps, IToolbarState> {
218218
* @returns React element
219219
*/
220220
private _renderBranchMenu(): React.ReactElement | null {
221-
if (!this.state.repository) {
221+
if (!this.props.model.pathRepository) {
222222
return null;
223223
}
224224
return (

0 commit comments

Comments
 (0)