From 14566eb98bb3b0cb5c593d77265e582dc06346b0 Mon Sep 17 00:00:00 2001 From: Isiah Meadows Date: Sat, 20 Aug 2016 13:27:41 -0400 Subject: [PATCH] Actually break the loop when checking the version --- lib/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index 5ba09056..e3830d39 100644 --- a/lib/index.js +++ b/lib/index.js @@ -36,10 +36,10 @@ var versions = { var nodeVersion = process.versions.node; var fsName; -Object.keys(versions).forEach(function(version) { +Object.keys(versions).some(function(version) { if (semver.satisfies(nodeVersion, version)) { fsName = versions[version]; - return false; + return true; } });