From a9d3ae4ef88df33a3571842b4e68e04bf3cd6df5 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Fri, 9 Sep 2016 16:34:02 +0100 Subject: [PATCH] fix tests --- lib/sync.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"]); + } } /**