make 'require is defined' a precondition for Node-based sys
This commit is contained in:
parent
7e8cfa0859
commit
bc3025b391
|
@ -334,7 +334,7 @@ namespace ts {
|
|||
if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") {
|
||||
return getWScriptSystem();
|
||||
}
|
||||
else if (typeof process !== "undefined" && process.nextTick && !process.browser) {
|
||||
else if (typeof process !== "undefined" && process.nextTick && !process.browser && typeof require !== "undefined") {
|
||||
// process and process.nextTick checks if current environment is node-like
|
||||
// process.browser check excludes webpack and browserify
|
||||
return getNodeSystem();
|
||||
|
|
Loading…
Reference in a new issue