From 8b4250c1429478c40666a0eb55db6073d82a1e51 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 28 Aug 2020 10:46:29 +0100 Subject: [PATCH] expose RightPanelStore in window --- src/@types/global.d.ts | 2 ++ src/stores/RightPanelStore.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/@types/global.d.ts b/src/@types/global.d.ts index 84340d8219..1a361e7b55 100644 --- a/src/@types/global.d.ts +++ b/src/@types/global.d.ts @@ -28,6 +28,7 @@ import SettingsStore from "../settings/SettingsStore"; import {ActiveRoomObserver} from "../ActiveRoomObserver"; import {Notifier} from "../Notifier"; import type {Renderer} from "react-dom"; +import RightPanelStore from "../stores/RightPanelStore"; declare global { interface Window { @@ -49,6 +50,7 @@ declare global { singletonModalManager: ModalManager; mxSettingsStore: SettingsStore; mxNotifier: typeof Notifier; + mxRightPanelStore: RightPanelStore; } interface Document { diff --git a/src/stores/RightPanelStore.ts b/src/stores/RightPanelStore.ts index c1799978ad..34445d007b 100644 --- a/src/stores/RightPanelStore.ts +++ b/src/stores/RightPanelStore.ts @@ -223,3 +223,5 @@ export default class RightPanelStore extends Store { return RightPanelStore.instance; } } + +window.mxRightPanelStore = RightPanelStore.getSharedInstance();