mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-03-15 05:55:11 -05:00
Merge pull request #3050 from tinganho/iojs
Fixes iojs environment check issue
This commit is contained in:
@@ -45,10 +45,10 @@ module Utils {
|
||||
export function getExecutionEnvironment() {
|
||||
if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
|
||||
return ExecutionEnvironment.CScript;
|
||||
} else if (process && process.execPath && process.execPath.indexOf("node") !== -1) {
|
||||
return ExecutionEnvironment.Node;
|
||||
} else {
|
||||
} else if (typeof window !== "undefined") {
|
||||
return ExecutionEnvironment.Browser;
|
||||
} else {
|
||||
return ExecutionEnvironment.Node;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user