You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
MatrixChat: Check if our state array is empty in the crawled messages response.
This commit is contained in:
@@ -2146,7 +2146,10 @@ export default createReactClass({
|
|||||||
// Convert the plain JSON events into Matrix events so they get
|
// Convert the plain JSON events into Matrix events so they get
|
||||||
// decrypted if necessary.
|
// decrypted if necessary.
|
||||||
const matrixEvents = res.chunk.map(eventMapper);
|
const matrixEvents = res.chunk.map(eventMapper);
|
||||||
const stateEvents = res.state.map(eventMapper);
|
let stateEvents = [];
|
||||||
|
if (res.state !== undefined) {
|
||||||
|
stateEvents = res.state.map(eventMapper);
|
||||||
|
}
|
||||||
|
|
||||||
const profiles = {};
|
const profiles = {};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user