mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Fix breaking on 0.0.0 version
This commit is contained in:
parent
8468d846b8
commit
cbdf513bc1
1 changed files with 4 additions and 0 deletions
|
|
@ -74,6 +74,10 @@ function normalizeVersion ( rawVersion ) {
|
|||
version = version
|
||||
.split('.')
|
||||
.map( part => {
|
||||
// It it's just a single digit
|
||||
// pass it as-is
|
||||
if ( part.length === 1 ) return part
|
||||
|
||||
// Trim leading zeros
|
||||
return part.replace(/^0+/, '')
|
||||
} )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue