diff options
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/core-utils.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/helpers/core-utils.ts b/server/helpers/core-utils.ts index ceb6a341d..0bd84ffaa 100644 --- a/server/helpers/core-utils.ts +++ b/server/helpers/core-utils.ts | |||
@@ -251,6 +251,7 @@ function promisify2<T, U, A> (func: (arg1: T, arg2: U, cb: (err: any, result: A) | |||
251 | } | 251 | } |
252 | } | 252 | } |
253 | 253 | ||
254 | type SemVersion = { major: number, minor: number, patch: number } | ||
254 | function parseSemVersion (s: string) { | 255 | function parseSemVersion (s: string) { |
255 | const parsed = s.match(/^v?(\d+)\.(\d+)\.(\d+)$/i) | 256 | const parsed = s.match(/^v?(\d+)\.(\d+)\.(\d+)$/i) |
256 | 257 | ||
@@ -258,7 +259,7 @@ function parseSemVersion (s: string) { | |||
258 | major: parseInt(parsed[1]), | 259 | major: parseInt(parsed[1]), |
259 | minor: parseInt(parsed[2]), | 260 | minor: parseInt(parsed[2]), |
260 | patch: parseInt(parsed[3]) | 261 | patch: parseInt(parsed[3]) |
261 | } | 262 | } as SemVersion |
262 | } | 263 | } |
263 | 264 | ||
264 | const randomBytesPromise = promisify1<number, Buffer>(randomBytes) | 265 | const randomBytesPromise = promisify1<number, Buffer>(randomBytes) |