fix: always show log data

This commit is contained in:
Derrick Hammer 2023-10-12 03:40:39 -04:00
parent a4b9b46a3e
commit d3259fa3f4
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 11 deletions

View File

@ -162,18 +162,11 @@ function handleMessage(event: MessageEvent) {
// Handle logging messages.
if (event.data.method === "log" && !IS_EXTENSION) {
// We display the logging message if the kernel is a browser
// extension, so that the kernel's logs appear in the app
// console as well as the extension console. If the kernel is
// in an iframe, its logging messages will already be in the
// 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;
}