Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
We expect void so return void
  • Loading branch information
MadLittleMods committed Jul 19, 2022
commit cd41d7eb13a871d27a636a40e8ed76e42b9e1244
7 changes: 4 additions & 3 deletions src/timeline-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class TimelineWindow {
*
* @return {Promise}
*/
public load(initialEventId?: string, initialWindowSize = 20): Promise<void> {
public async load(initialEventId?: string, initialWindowSize = 20): Promise<void> {
// given an EventTimeline, find the event we were looking for, and initialise our
// fields so that the event in question is in the middle of the window.
const initFields = (timeline: EventTimeline) => {
Expand Down Expand Up @@ -135,11 +135,12 @@ export class TimelineWindow {
return Promise.resolve();
}

return this.client.getEventTimeline(this.timelineSet, initialEventId).then(initFields);
await this.client.getEventTimeline(this.timelineSet, initialEventId).then(initFields);
return;
} else {
const tl = this.timelineSet.getLiveTimeline();
initFields(tl);
return Promise.resolve();
return;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split out to #2849

}
}

Expand Down