File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ export class TimelineWindow {
101101 *
102102 * @return {Promise }
103103 */
104- public load ( initialEventId ?: string , initialWindowSize = 20 ) : Promise < void > {
104+ public async load ( initialEventId ?: string , initialWindowSize = 20 ) : Promise < void > {
105105 // given an EventTimeline, find the event we were looking for, and initialise our
106106 // fields so that the event in question is in the middle of the window.
107107 const initFields = ( timeline : Optional < EventTimeline > ) => {
@@ -135,13 +135,14 @@ export class TimelineWindow {
135135 // which is important to keep room-switching feeling snappy.
136136 if ( this . timelineSet . getTimelineForEvent ( initialEventId ) ) {
137137 initFields ( this . timelineSet . getTimelineForEvent ( initialEventId ) ) ;
138- return Promise . resolve ( ) ;
138+ return ;
139139 } else if ( initialEventId ) {
140- return this . client . getEventTimeline ( this . timelineSet , initialEventId )
140+ await this . client . getEventTimeline ( this . timelineSet , initialEventId )
141141 . then ( initFields ) ;
142+ return ;
142143 } else {
143144 initFields ( this . timelineSet . getLiveTimeline ( ) ) ;
144- return Promise . resolve ( ) ;
145+ return ;
145146 }
146147 }
147148
You can’t perform that action at this time.
0 commit comments