diff options
Diffstat (limited to 'src/js/builtins/ConsoleObject.ts')
-rw-r--r-- | src/js/builtins/ConsoleObject.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/js/builtins/ConsoleObject.ts b/src/js/builtins/ConsoleObject.ts index da316efdc..b48593154 100644 --- a/src/js/builtins/ConsoleObject.ts +++ b/src/js/builtins/ConsoleObject.ts @@ -116,7 +116,7 @@ export function write(this: Console, input) { const count = $argumentCount(); for (var i = 1; i < count; i++) { - wrote += writer.write($argument(i)); + wrote += writer.write(arguments[i]); } writer.flush(true); @@ -278,7 +278,7 @@ export function createConsoleConstructor(console: typeof globalThis.console) { }; const table = (head, columns) => { - const columnWidths = ArrayPrototypeMap.call(head, h => getStringWidth(h)) as number[]; + const columnWidths = ArrayPrototypeMap.$call(head, h => getStringWidth(h)) as number[]; const longestColumn = Math.max(...(ArrayPrototypeMap as any).$call(columns, a => a.length)); const rows: any = $newArrayWithSize(longestColumn); @@ -508,7 +508,7 @@ export function createConsoleConstructor(console: typeof globalThis.console) { const errorHandler = useStdout ? this._stdoutErrorHandler : this._stderrErrorHandler; if (groupIndent.length !== 0) { - if (StringPrototypeIncludes.call(string, "\n")) { + if (StringPrototypeIncludes.$call(string, "\n")) { // ?! string = (RegExpPrototypeSymbolReplace.$call as any)(/\n/g, string, `\n${groupIndent}`); } @@ -657,7 +657,7 @@ export function createConsoleConstructor(console: typeof globalThis.console) { if (!expression) { args[0] = `Assertion failed${args.length === 0 ? "" : `: ${args[0]}`}`; // The arguments will be formatted in warn() again - Reflect.apply(this.warn, this, args); + this.warn.$apply(this, args); } }, @@ -698,7 +698,7 @@ export function createConsoleConstructor(console: typeof globalThis.console) { group(...data) { if (data.length > 0) { - Reflect.apply(this.log, this, data); + this.log.$apply(this, data); } this[kGroupIndent] += StringPrototypeRepeat.$call(" ", this[kGroupIndentationWidth]); }, |