Skip to content

Commit 0c2ae8f

Browse files
committed
Fixes iojs environment check issue
1 parent 7b860f5 commit 0c2ae8f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/harness/harness.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ module Utils {
4545
export function getExecutionEnvironment() {
4646
if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
4747
return ExecutionEnvironment.CScript;
48-
} else if (process && process.execPath && process.execPath.indexOf("node") !== -1) {
49-
return ExecutionEnvironment.Node;
50-
} else {
48+
} else if (typeof window !== "undefined") {
5149
return ExecutionEnvironment.Browser;
50+
} else {
51+
return ExecutionEnvironment.Node;
5252
}
5353
}
5454

0 commit comments

Comments
 (0)