We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6513bb0 commit 3365894Copy full SHA for 3365894
src/common/EvalIFrame.res
@@ -45,12 +45,17 @@ let srcDoc = `
45
});
46
const sendLog = (logLevel) => (...args) => {
47
let finalArgs = args.map(arg => {
48
- if (typeof arg === 'object') {
49
- return JSON.stringify(arg);
+ if (arg === undefined) {
+ return 'undefined';
50
+ }
51
+ else if (typeof arg === 'object') {
52
+ return JSON.stringify(arg, Object.getOwnPropertyNames(arg));
53
+ } else if (typeof arg === 'function') {
54
+ return '[function]';
55
}
56
return arg;
57
- parent.window.postMessage({ type: logLevel, args: finalArgs }, '*')
58
+ parent.window.postMessage({ type: logLevel, args: finalArgs }, '*');
59
};
60
console.log = sendLog('log');
61
console.warn = sendLog('warn');
0 commit comments