From 08df86900b45f400e434f3244d0d31598e748749 Mon Sep 17 00:00:00 2001 From: Tenor Biel Date: Tue, 24 Jul 2018 12:11:05 -0500 Subject: [PATCH] Guard against falsey process.versions to support React Native --- src/util.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/util.js b/src/util.js index 45ea3beda..314322d6d 100644 --- a/src/util.js +++ b/src/util.js @@ -385,8 +385,12 @@ var ret = { domainBind: domainBind }; ret.isRecentNode = ret.isNode && (function() { - var version = process.versions.node.split(".").map(Number); - return (version[0] === 0 && version[1] > 10) || (version[0] > 0); + if (process.versions) { + var version = process.versions.node.split(".").map(Number); + return (version[0] === 0 && version[1] > 10) || (version[0] > 0); + } + + return false })(); if (ret.isNode) ret.toFastProperties(process);