fix: guard transcript sandbox subscription

This commit is contained in:
Vasanthdev2004
2026-04-01 22:12:45 +05:30
parent 5f774cfe5d
commit 6c35f4e52e

View File

@@ -32,7 +32,13 @@ export function SandboxViolationExpandedView() {
let t2;
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
t1 = () => {
if (!SandboxManager.isSandboxingEnabled() || getPlatform() === "linux") {
return;
}
const store = SandboxManager.getSandboxViolationStore();
if (!store || typeof store.subscribe !== "function") {
return;
}
const unsubscribe = store.subscribe(allViolations => {
setViolations(allViolations.slice(-10));
setTotalCount(store.getTotalCount());