Prefer ChakraHost when available to node and WScript
This commit is contained in:
parent
ac6224d600
commit
aa2708f510
1 changed files with 4 additions and 4 deletions
|
@ -642,7 +642,10 @@ namespace ts {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
|
if (typeof ChakraHost !== "undefined") {
|
||||||
|
return getChakraSystem();
|
||||||
|
}
|
||||||
|
else if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
|
||||||
return getWScriptSystem();
|
return getWScriptSystem();
|
||||||
}
|
}
|
||||||
else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") {
|
else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") {
|
||||||
|
@ -650,9 +653,6 @@ namespace ts {
|
||||||
// process.browser check excludes webpack and browserify
|
// process.browser check excludes webpack and browserify
|
||||||
return getNodeSystem();
|
return getNodeSystem();
|
||||||
}
|
}
|
||||||
else if (typeof ChakraHost !== "undefined") {
|
|
||||||
return getChakraSystem();
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
return undefined; // Unsupported host
|
return undefined; // Unsupported host
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue