export class App extends React.PureComponent<Props, State> {
mounted = false;
+ requiresInitialFetch = false;
bulkButtonRef: React.RefObject<HTMLButtonElement>;
constructor(props: Props) {
if (!this.props.isFetchingBranch) {
this.fetchFirstIssues(true).catch(() => undefined);
+ } else {
+ this.requiresInitialFetch = true;
}
}
const { query: prevQuery } = prevProps.location;
const { openIssue } = this.state;
+ if (this.requiresInitialFetch && !this.props.isFetchingBranch) {
+ this.requiresInitialFetch = false;
+ this.fetchFirstIssues(true).catch(() => undefined);
+ return;
+ }
+
if (
prevProps.component !== this.props.component ||
!isSameBranchLike(prevProps.branchLike, this.props.branchLike) ||