Skip to content

armgit / ente

Public Imported from GitHub
0

💚 End-to-end encrypted cloud for everything.

fix: don’t re-create context if exists

httpjamesm1f40e854ae90
diff --git a/apps/cast/src/pages/index.tsx b/apps/cast/src/pages/index.tsx
index 65c3671da6..239278265a 100644
--- a/apps/cast/src/pages/index.tsx
+++ b/apps/cast/src/pages/index.tsx
@@ -45,6 +45,9 @@ export default function PairingMode() {
if (isCastReady) return;
const context = cast.framework.CastReceiverContext.getInstance();
+ // if there's already a context, don't recreate it to prevent crash
+ if (context) return;
+
const options = new cast.framework.CastReceiverOptions();
options.customNamespaces = Object.assign({});
options.customNamespaces['urn:x-cast:pair-request'] =