1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2026-01-03 23:22:30 +03:00

Fix tests; need more paranoia

This commit is contained in:
Kegan Dougal
2015-12-14 14:16:47 +00:00
parent f48c9175e5
commit 46504b8b9f

View File

@@ -297,7 +297,9 @@ SyncApi.prototype._sync = function(syncOptions, attempt) {
var ephemeralEvents = self._mapSyncEventsFormat(joinObj.ephemeral);
var accountDataEvents = self._mapSyncEventsFormat(joinObj.account_data);
if (joinObj.timeline && joinObj.timeline.limited) {
joinObj.timeline = joinObj.timeline || {};
if (joinObj.timeline.limited) {
// nuke the timeline so we don't get holes
room.timeline = [];
}