Skip to content

Commit

Permalink
added proper version check supporting VSCode (#1576)
Browse files Browse the repository at this point in the history
Thanks!
  • Loading branch information
mlostekk authored and benjamingr committed Jan 22, 2019
1 parent 499cf8e commit b97c0d2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/util.js
Expand Up @@ -385,7 +385,12 @@ var ret = {
domainBind: domainBind
};
ret.isRecentNode = ret.isNode && (function() {
var version = process.versions.node.split(".").map(Number);
var version;
if (process.versions && process.versions.node) {
version = process.versions.node.split(".").map(Number);
} else if (process.version) {
version = process.version.split(".").map(Number);
}
return (version[0] === 0 && version[1] > 10) || (version[0] > 0);
})();

Expand Down

0 comments on commit b97c0d2

Please sign in to comment.