From 63688bd5659274b07c056c535ae9bb52849a50a4 Mon Sep 17 00:00:00 2001 From: Chris Pirich Date: Fri, 26 Oct 2018 09:39:13 -0700 Subject: [PATCH] fix node checking so we work on browsers and node --- src/loadP5.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loadP5.js b/src/loadP5.js index f3a04b6b..ce33b0e9 100644 --- a/src/loadP5.js +++ b/src/loadP5.js @@ -1,6 +1,6 @@ let context; -if (typeof global !== undefined) { +if ((typeof process !== 'undefined') && (process.release) && (process.release.name === 'node')) { context = global; const {JSDOM} = eval("require('jsdom')"); // eslint-disable-line no-eval