Fixes iojs environment check issue

This commit is contained in:
Tingan Ho
2015-05-06 10:12:37 +08:00
parent 7b860f5df0
commit 0c2ae8fc53
+3 -3
View File
@@ -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;
}
}