Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 6196c03

Browse files
committed
Fix stickerpicker not having correct contexts
Signed-off-by: Michael Telatynski <[email protected]>
1 parent fa1a956 commit 6196c03

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/components/views/elements/PersistedElement.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import {throttle} from "lodash";
2121
import ResizeObserver from 'resize-observer-polyfill';
2222

2323
import dis from '../../../dispatcher/dispatcher';
24+
import MatrixClientContext from "../../../contexts/MatrixClientContext";
25+
import {MatrixClientPeg} from "../../../MatrixClientPeg";
2426

2527
// Shamelessly ripped off Modal.js. There's probably a better way
2628
// of doing reusable widgets like dialog boxes & menus where we go and
@@ -144,9 +146,11 @@ export default class PersistedElement extends React.Component {
144146
}
145147

146148
renderApp() {
147-
const content = <div ref={this.collectChild} style={this.props.style}>
148-
{this.props.children}
149-
</div>;
149+
const content = <MatrixClientContext.Provider value={MatrixClientPeg.get()}>
150+
<div ref={this.collectChild} style={this.props.style}>
151+
{this.props.children}
152+
</div>
153+
</MatrixClientContext.Provider>;
150154

151155
ReactDOM.render(content, getOrCreateContainer('mx_persistedElement_'+this.props.persistKey));
152156
}

0 commit comments

Comments
 (0)