Merge pull request #61 from Vasanthdev2004/ctrl-o-expand-crash

fix: guard ctrl-o transcript sandbox subscription
This commit is contained in:
Kevin Codex
2026-04-02 02:05:41 +08:00
committed by GitHub
2 changed files with 9 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ type Props = {
reviewState?: PrReviewState; reviewState?: PrReviewState;
bold?: boolean; bold?: boolean;
}; };
export function PrBadge(t0) { export function PrBadge(t0: Props): React.ReactNode {
const $ = _c(21); const $ = _c(21);
const { const {
number, number,

View File

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