mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 05:25:40 +09:00
feat(voice): add screen share subscription debug helper (#2432)
This commit is contained in:
1 parent
6c634b686f
commit
eb4562b6a6
8 files changed
+532
-23
No files matched your search
@@ -0,0 +1,19 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
type FluxerDebugObject = NonNullable<Window['__FLUXER_DEBUG__']>;
|
||||
|
||||
export function getFluxerDebugObject(): FluxerDebugObject | null {
|
||||
if (typeof window === 'undefined') {
|
||||
return null;
|
||||
}
|
||||
const existing = window.__FLUXER_DEBUG__;
|
||||
if (existing === undefined || existing === null) {
|
||||
const created: FluxerDebugObject = {};
|
||||
window.__FLUXER_DEBUG__ = created;
|
||||
return created;
|
||||
}
|
||||
if (typeof existing !== 'object' || Array.isArray(existing)) {
|
||||
return null;
|
||||
}
|
||||
return existing;
|
||||
}
|
||||
Reference in new issue
Block a user