Skip to content

Commit

Permalink
Allows versions without a patch
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Jun 14, 2019
1 parent b1b4845 commit a96e98a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/system/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ export namespace Versions {
export function from(
major: string | number,
minor: string | number,
patch: string | number,
patch?: string | number,
pre?: string
): Version {
return {
major: typeof major === 'string' ? parseInt(major, 10) : major,
minor: typeof minor === 'string' ? parseInt(minor, 10) : minor,
patch: typeof patch === 'string' ? parseInt(patch, 10) : patch,
patch: patch == null ? 0 : typeof patch === 'string' ? parseInt(patch, 10) : patch,
pre: pre
};
}
Expand Down

0 comments on commit a96e98a

Please sign in to comment.