From 6acab90cb6d4884aa73867ae5c33260a9cb4961f Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Fri, 1 Nov 2019 09:15:42 +0100 Subject: [PATCH] fix: report user code evaluation errors Errors thrown during evaluation of the user's code will now be reported. JavaScript challenges will only report to the browser console and only during testing. DOM challenges will report to the browser console during testing and as the user types, but only report to the fcc console during testing --- client/src/templates/Challenges/utils/frame.js | 1 + 1 file changed, 1 insertion(+) diff --git a/client/src/templates/Challenges/utils/frame.js b/client/src/templates/Challenges/utils/frame.js index da021b4f820..fe052b4bf7a 100644 --- a/client/src/templates/Challenges/utils/frame.js +++ b/client/src/templates/Challenges/utils/frame.js @@ -22,6 +22,7 @@ const createHeader = (id = mainId) => ` window.__frameId = '${id}'; window.onerror = function(msg, url, ln, col, err) { window.__err = err; + console.log(msg); return true; }; document.addEventListener('click', function(e) {