Skip to content

Commit

Permalink
Ensure that TS can run in a browser by checking for a process obj bef…
Browse files Browse the repository at this point in the history
…ore using it in the perf logger
  • Loading branch information
orta committed Aug 29, 2019
1 parent fa9e0fa commit 206de25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/compiler/perfLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ namespace ts {

/** Performance logger that will generate ETW events if possible */
export const perfLogger: PerfLogger = etwModule ? 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)}`);
}

0 comments on commit 206de25

Please sign in to comment.