mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Ensure that TS can run in a browser by checking for a process obj before using it in the perf logger (#33141)
This commit is contained in:
parent
8ca36f3516
commit
9920da291f
@ -38,6 +38,6 @@ namespace ts {
|
||||
|
||||
/** Performance logger that will generate ETW events if possible - check for `logEvent` member, as `etwModule` will be `{}` when browserified */
|
||||
export const perfLogger: PerfLogger = etwModule && etwModule.logEvent ? etwModule : nullLogger;
|
||||
|
||||
perfLogger.logInfoEvent(`Starting TypeScript v${versionMajorMinor} with command line: ${JSON.stringify(process.argv)}`);
|
||||
const args = typeof process === "undefined" ? [] : process.argv;
|
||||
perfLogger.logInfoEvent(`Starting TypeScript v${versionMajorMinor} with command line: ${JSON.stringify(args)}`);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user