fix: always show log data
This commit is contained in:
parent
a4b9b46a3e
commit
d3259fa3f4
|
@ -162,17 +162,10 @@ function handleMessage(event: MessageEvent) {
|
||||||
|
|
||||||
// Handle logging messages.
|
// Handle logging messages.
|
||||||
if (event.data.method === "log" && !IS_EXTENSION) {
|
if (event.data.method === "log" && !IS_EXTENSION) {
|
||||||
// We display the logging message if the kernel is a browser
|
if (event.data.data.isErr) {
|
||||||
// extension, so that the kernel's logs appear in the app
|
console.error(event.data.data.message);
|
||||||
// console as well as the extension console. If the kernel is
|
} else {
|
||||||
// in an iframe, its logging messages will already be in the
|
console.log(event.data.data.message);
|
||||||
// app console and therefore don't need to be displayed.
|
|
||||||
if (kernelOrigin === window.origin) {
|
|
||||||
if (event.data.data.isErr) {
|
|
||||||
console.error(event.data.data.message);
|
|
||||||
} else {
|
|
||||||
console.log(event.data.data.message);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue