diff --git a/lib/sync.js b/lib/sync.js index df7df05a5..4ee175928 100644 --- a/lib/sync.js +++ b/lib/sync.js @@ -74,7 +74,9 @@ function SyncApi(client, opts) { this._connectionReturnedDefer = null; this._notifEvents = []; // accumulator of sync events in the current sync response - reEmit(client, client.getNotifTimelineSet(), ["Room.timeline"]); + if (client.getNotifTimelineSet()) { + reEmit(client, client.getNotifTimelineSet(), ["Room.timeline"]); + } } /**