From a2ab36480f9c76f1a716a97485dbc1427b6f85db Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Thu, 6 Jan 2022 15:02:44 +0530 Subject: [PATCH] Add jsdoc comment --- src/matrix/room/timeline/Timeline.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/matrix/room/timeline/Timeline.js b/src/matrix/room/timeline/Timeline.js index 196dac03..e4014340 100644 --- a/src/matrix/room/timeline/Timeline.js +++ b/src/matrix/room/timeline/Timeline.js @@ -329,8 +329,13 @@ export class Timeline { } } - _getTrackedEntry(id) { - return this.getByEventId(id) ?? this._contextEntriesNotInTimeline.get(id); + /** + * Fetches an entry with the given event-id from remoteEntries or contextEntriesNotInTimeline. + * @param {string} eventId event-id of the entry + * @returns entry if found, undefined otherwise + */ + _getTrackedEntry(eventId) { + return this.getByEventId(eventId) ?? this._contextEntriesNotInTimeline.get(eventId); } async _getEventFromStorage(eventId) {