Skip to content

Commit

Permalink
don't split on emtpy version
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-deboer committed Oct 8, 2017
1 parent ed291b7 commit 14c3257
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/ui/src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,12 @@ class Header extends React.Component {
return resp.text()
}
}).then(version => {
let parts = version.split(/-|\+/)
version = parts.slice(0,2).join('-')
if (parts.length > 2) {
version += '+'
if (version) {
let parts = version.split(/-|\+/)
version = parts.slice(0,2).join('-')
if (parts.length > 2) {
version += '+'
}
}
return version
})
Expand Down

0 comments on commit 14c3257

Please sign in to comment.