From c2cc0862179b987fa0367fcbb5169391cb6a50a2 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 18 Mar 2021 21:24:02 -0600 Subject: [PATCH] Import the js-sdk at the index so the `request` object gets set Now that all the imports are replaced, we need to set up the js-sdk somewhere. Might as well do it in the index of the react-sdk where callers will be relying on those skin functions. --- src/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.js b/src/index.js index 008e15ad90..e360c04f4f 100644 --- a/src/index.js +++ b/src/index.js @@ -28,3 +28,7 @@ export function resetSkin() { export function getComponent(componentName) { return Skinner.getComponent(componentName); } + +// Import the js-sdk so the proper `request` object can be set. This does some +// magic with the browser injection to make all subsequent imports work fine. +import "matrix-js-sdk";