Skip to content

Commit 09455be

Browse files
committed
🐞 fix(sandbox): Bypass error message in zhihu-hybrid environment
1 parent ef24254 commit 09455be

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/stores/sandbox.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ const mockConsole = () => {
6161
};
6262

6363
console.error = function error(...args: unknown[]) {
64+
if (typeof args[0] === "string" && args[0].startsWith("\u8bf7\u63a5\u5165 zhihu-hybrid")) {
65+
// Bypass error message in Zhihu Hybrid environment
66+
originalConsole.error(...args);
67+
return;
68+
}
6469
// TODO: Support error stack
6570
appendOutput("error", indent(showArgs(args)));
6671
};

0 commit comments

Comments
 (0)