Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Rasmussen <mathiasvr@gmail.com>2016-07-03 02:49:16 +0300
committerMathias Rasmussen <mathiasvr@gmail.com>2016-07-03 03:01:20 +0300
commita3f4756670279c61f82c1258e84f5ddff87c8665 (patch)
treec8bbd9d44686f63657700d4f481b700ccc6c2c2e /index.js
parent46b3655927eefb4a18fbbfd547013863ccdaed4b (diff)
Fix version string
`.map` calls zeroFill with the index as `pad` argument, causing incorrect results like `'1.2.5' -> '0112'`.
Diffstat (limited to 'index.js')
-rw-r--r--index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.js b/index.js
index 3402551..85c43da 100644
--- a/index.js
+++ b/index.js
@@ -31,7 +31,7 @@ var VERSION = require('./package.json').version
* '0.16.1' -> '0016'
* '1.2.5' -> '0102'
*/
-var VERSION_STR = VERSION.match(/([0-9]+)/g).slice(0, 2).map(zeroFill(2)).join('')
+var VERSION_STR = VERSION.match(/([0-9]+)/g).slice(0, 2).map(v => zeroFill(2, v)).join('')
/**
* Version prefix string (used in peer ID). WebTorrent uses the Azureus-style