diff options
author | Mathias Rasmussen <mathiasvr@gmail.com> | 2016-07-03 02:49:16 +0300 |
---|---|---|
committer | Mathias Rasmussen <mathiasvr@gmail.com> | 2016-07-03 03:01:20 +0300 |
commit | a3f4756670279c61f82c1258e84f5ddff87c8665 (patch) | |
tree | c8bbd9d44686f63657700d4f481b700ccc6c2c2e /index.js | |
parent | 46b3655927eefb4a18fbbfd547013863ccdaed4b (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.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |