Skip to content

Commit

Permalink
Fixing error in source summary get
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Jun 14, 2024
1 parent 7d0e86c commit 00cb793
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/sources/SourceHome.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,12 @@ class SourceHome extends React.Component {
}

fetchSelectedSourceVersionSummary = () => {
this.setState({sourceVersionSummary: {}}, () => {
const { source } = this.state
APIService.new().overrideURL(source.version_url || source.url).appendToUrl('summary/').get(null, null, {verbose: true}).then(response => this.setState({sourceVersionSummary: response.data}))
})
const { source } = this.state
if(source?.id) {
this.setState({sourceVersionSummary: {}}, () => {
APIService.new().overrideURL(source.version_url || source.url).appendToUrl('summary/').get(null, null, {verbose: true}).then(response => this.setState({sourceVersionSummary: response.data}))
})
}
}

refreshDataByURL() {
Expand Down

0 comments on commit 00cb793

Please sign in to comment.