Skip to content

Commit

Permalink
Use "var" instead of const, in order to support node 0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
nknapp committed Jan 9, 2018
1 parent f9ba337 commit 1a6b410
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
@@ -1,6 +1,7 @@
sudo: false
language: "node_js"
node_js:
- "0.12"
- "4"
- "6"
- "8"
Expand Down
5 changes: 3 additions & 2 deletions index.js
Expand Up @@ -7,8 +7,9 @@

'use strict'

const versionStr = process.version.match(/v(\d+).*/)[1]
const majorVersion = Number(versionStr)
// Use "var" instead of const, in order to support node 0.10
var versionStr = process.version.match(/v(\d+).*/)[1]
var majorVersion = Number(versionStr)
if (majorVersion >= 8) {
require('trace')
require('clarify')
Expand Down

0 comments on commit 1a6b410

Please sign in to comment.