We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9746dab commit eace2a3Copy full SHA for eace2a3
packages/app/src/app/pages/Sandbox/SearchDependencies/DependencyHit/index.js
@@ -22,11 +22,21 @@ import {
22
StyledUserWithAvatar,
23
} from './elements';
24
25
+const getDefaultSelectedVersion = tags => {
26
+ if (!tags) {
27
+ return '';
28
+ }
29
+
30
+ if (!tags.latest) {
31
32
33
34
+ return tags.latest + ' - latest';
35
+};
36
37
export default class DependencyHit extends React.PureComponent {
38
state = {
- selectedVersion: this.props.hit.tags
- ? this.props.hit.tags.latest || ''
- : '',
39
+ selectedVersion: getDefaultSelectedVersion(this.props.hit.tags),
40
};
41
42
makeGitHubRepoUrl(repo) {
0 commit comments