Skip to content

Commit

Permalink
Ignore non-numeric browser versions for 'latest'
Browse files Browse the repository at this point in the history
resolves #963
  • Loading branch information
jason0x43 committed Jan 11, 2019
1 parent 8a57ee3 commit 4664287
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/resolveEnvironments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ function resolveVersionAlias(version: string, availableVersions: string[]) {
// Only consider numeric versions; we don't want 'beta' or 'dev'
const numericVersions = availableVersions
.filter(version => {
return !isNaN(parseFloat(version));
return !isNaN(Number(version));
})
.sort((a, b) => {
return parseFloat(a) - parseFloat(b);
return Number(a) - Number(b);
});

let offset = pieces.length === 2 ? Number(pieces[1]) : 0;
Expand Down

0 comments on commit 4664287

Please sign in to comment.