You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-11-28 09:24:05 +03:00
fix more tests
This commit is contained in:
@@ -50,8 +50,8 @@ class Skinner {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// components have to be functions.
|
// components have to be functions or forwardRef objects with a render function.
|
||||||
const validType = typeof comp === 'function';
|
const validType = typeof comp === 'function' || comp.render;
|
||||||
if (!validType) {
|
if (!validType) {
|
||||||
throw new Error(`Not a valid component: ${name} (type = ${typeof(comp)}).`);
|
throw new Error(`Not a valid component: ${name} (type = ${typeof(comp)}).`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class WrappedMessagePanel extends React.Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return <MatrixClientContext.Provider value={client}>
|
return <MatrixClientContext.Provider value={client}>
|
||||||
<RoomContext.Provider value={{ canReact: true, canReply: true }}>
|
<RoomContext.Provider value={{ canReact: true, canReply: true, room, roomId: room.roomId }}>
|
||||||
<MessagePanel room={room} {...this.props} resizeNotifier={this.state.resizeNotifier} />
|
<MessagePanel room={room} {...this.props} resizeNotifier={this.state.resizeNotifier} />
|
||||||
</RoomContext.Provider>
|
</RoomContext.Provider>
|
||||||
</MatrixClientContext.Provider>;
|
</MatrixClientContext.Provider>;
|
||||||
|
|||||||
Reference in New Issue
Block a user