Skip to content

Commit 6caec67

Browse files
committed
Bind console log method so it works in the browser
1 parent 0a9fb1a commit 6caec67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/harness/harness.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ module Harness {
493493
export let readFile: typeof IO.readFile = ts.sys.readFile;
494494
export let writeFile: typeof IO.writeFile = ts.sys.writeFile;
495495
export let fileExists: typeof IO.fileExists = fs.existsSync;
496-
export let log: typeof IO.log = console.log;
496+
export let log: typeof IO.log = console.log.bind(console);
497497

498498
export function createDirectory(path: string) {
499499
if (!directoryExists(path)) {
@@ -673,7 +673,7 @@ module Harness {
673673
};
674674
export let listFiles = Utils.memoize(_listFilesImpl);
675675

676-
export let log = console.log;
676+
export let log = console.log.bind(console);
677677

678678
export function readFile(file: string) {
679679
let response = Http.getFileFromServerSync(serverRoot + file);

0 commit comments

Comments
 (0)