Merge pull request #61 from Vasanthdev2004/ctrl-o-expand-crash
fix: guard ctrl-o transcript sandbox subscription
This commit is contained in:
@@ -8,7 +8,7 @@ type Props = {
|
||||
reviewState?: PrReviewState;
|
||||
bold?: boolean;
|
||||
};
|
||||
export function PrBadge(t0) {
|
||||
export function PrBadge(t0: Props): React.ReactNode {
|
||||
const $ = _c(21);
|
||||
const {
|
||||
number,
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user