From cebfae64300eaf500b81f4c17fe52edd75eb9321 Mon Sep 17 00:00:00 2001 From: Ruben van de Ven Date: Mon, 28 Sep 2020 11:29:45 +0200 Subject: [PATCH] improve error handling and logging --- dist/static/assets/webcam.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/static/assets/webcam.js b/dist/static/assets/webcam.js index c8988d0a..39e4a595 100644 --- a/dist/static/assets/webcam.js +++ b/dist/static/assets/webcam.js @@ -457,12 +457,12 @@ if (event.reason && event.reason.message && event.reason.stack){ (function(){ const oldLog = console.log; - console.log = function () { - oldLog.apply(console, arguments); + console.log = function (...params) { + oldLog.apply(console, params); const err = new Error(); const logSrc = err.stack.split("\n")[1]; - const args = arguments.map((a) => ""+a); // to string + const args = params.map((a) => ""+a); // to string window.parent.postMessage([{ log: [{ method: 'log',