fix(client): handle challenge resets with hidden preview (#44570)
This commit is contained in:
committed by
GitHub
parent
dfd3fd452d
commit
85b9daedb8
@ -91,7 +91,8 @@ const mountFrame =
|
|||||||
};
|
};
|
||||||
|
|
||||||
const buildProxyConsole = proxyLogger => ctx => {
|
const buildProxyConsole = proxyLogger => ctx => {
|
||||||
if (proxyLogger) {
|
// window does not exist if the preview is hidden, so we have to check.
|
||||||
|
if (proxyLogger && ctx?.window) {
|
||||||
const oldLog = ctx.window.console.log.bind(ctx.window.console);
|
const oldLog = ctx.window.console.log.bind(ctx.window.console);
|
||||||
ctx.window.console.log = function proxyConsole(...args) {
|
ctx.window.console.log = function proxyConsole(...args) {
|
||||||
proxyLogger(args.map(arg => format(arg)).join(' '));
|
proxyLogger(args.map(arg => format(arg)).join(' '));
|
||||||
|
Reference in New Issue
Block a user