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;
|
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,
|
||||||
|
|||||||
@@ -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());
|
||||||
|
|||||||
Reference in New Issue
Block a user