Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix version string #851

Merged
merged 2 commits into from Jul 26, 2016
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Next

Fix version string

`.map` calls zeroFill with the index as `pad` argument, causing incorrect results like `'1.2.5' -> '0112'`.
  • Loading branch information
mathiasvr committed Jul 2, 2016
commit a3f4756670279c61f82c1258e84f5ddff87c8665
@@ -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
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.