Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
M-ZubairAhmed committed Jan 9, 2025
1 parent a8d2403 commit 9f3d9d0
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,17 @@ export default class TicketPopover extends React.PureComponent<Props, State> {
return null;
};

componentDidUpdate() {
componentDidMount() {
const issueKey = this.getIssueKey();
if (!issueKey) {
return;
}

const {instanceID} = issueKey;
const {ticketId, ticketDetails} = this.state;
if (!ticketDetails && this.props.show && ticketId) {
if (this.props.show && this.state.ticketId && !this.state.ticketDetails) {
this.props.fetchIssueByKey(this.state.ticketId, instanceID).then((res: {data?: TicketData}) => {
const updatedTicketDetails = getJiraTicketDetails(res.data);
if (this.props.connected && updatedTicketDetails && updatedTicketDetails.ticketId === ticketId) {
if (this.props.connected && updatedTicketDetails && updatedTicketDetails.ticketId === this.state.ticketId) {
this.setState({
ticketDetails: updatedTicketDetails,
});
Expand Down

0 comments on commit 9f3d9d0

Please sign in to comment.