mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
MatrixChat: Check if our state array is empty in the crawled messages response.
This commit is contained in:
parent
89f14e55a2
commit
64061173e1
@ -2146,7 +2146,10 @@ export default createReactClass({
|
||||
// Convert the plain JSON events into Matrix events so they get
|
||||
// decrypted if necessary.
|
||||
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 = {};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user