Skip to content

Commit

Permalink
wasm-bindgen-test: Use spread array arguments instead of arguments ob…
Browse files Browse the repository at this point in the history
…jects

Our testing runtime tries to call `Array.prototype.forEach` on this object, so
it had damn well better be a proper array!

Fixes rustwasm#1167
  • Loading branch information
fitzgen committed Jan 14, 2019
1 parent 666c1e4 commit 51ef19b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/cli/src/bin/wasm-bindgen-test-runner/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
<script>
const orig_console_log = console.log;
const orig_console_error = console.error;
console.log = function() {
console.log = function(...args) {
if (window.console_log_redirect)
window.console_log_redirect(orig_console_log, arguments);
window.console_log_redirect(orig_console_log, args);
else
orig_console_log.apply(this, arguments);
orig_console_log.apply(this, args);
};
console.error = function() {
console.error = function(...args) {
if (window.console_error_redirect)
window.console_error_redirect(orig_console_error, arguments);
window.console_error_redirect(orig_console_error, args);
else
orig_console_error.apply(this, arguments);
orig_console_error.apply(this, args);
};

window.__wbg_test_invoke = f => f();
Expand Down

0 comments on commit 51ef19b

Please sign in to comment.