We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7b860f5 + 0c2ae8f commit 78f81efCopy full SHA for 78f81ef
src/harness/harness.ts
@@ -45,10 +45,10 @@ module Utils {
45
export function getExecutionEnvironment() {
46
if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
47
return ExecutionEnvironment.CScript;
48
- } else if (process && process.execPath && process.execPath.indexOf("node") !== -1) {
49
- return ExecutionEnvironment.Node;
50
- } else {
+ } else if (typeof window !== "undefined") {
51
return ExecutionEnvironment.Browser;
+ } else {
+ return ExecutionEnvironment.Node;
52
}
53
54
0 commit comments