File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ export class ClientWidgetApi extends EventEmitter {
230230
231231 public async getWidgetVersions ( ) : Promise < ApiVersion [ ] > {
232232 if ( Array . isArray ( this . cachedWidgetVersions ) ) {
233- return Promise . resolve ( this . cachedWidgetVersions ) ;
233+ return this . cachedWidgetVersions ;
234234 }
235235
236236 try {
@@ -1141,7 +1141,7 @@ export class ClientWidgetApi extends EventEmitter {
11411141 private async flushRoomState ( ) : Promise < void > {
11421142 try {
11431143 // Only send a single action once all concurrent tasks have completed
1144- do await Promise . all ( [ ... this . pushRoomStateTasks ] ) ;
1144+ do await Promise . all ( this . pushRoomStateTasks ) ;
11451145 while ( this . pushRoomStateTasks . size > 0 ) ;
11461146
11471147 const events : IRoomEvent [ ] = [ ] ;
@@ -1251,7 +1251,7 @@ export class ClientWidgetApi extends EventEmitter {
12511251 eventTypeMap . set ( rawEvent . type , stateKeyMap ) ;
12521252 }
12531253 if ( ! stateKeyMap . has ( rawEvent . type ) ) stateKeyMap . set ( rawEvent . state_key , rawEvent ) ;
1254- do await Promise . all ( [ ... this . pushRoomStateTasks ] ) ;
1254+ do await Promise . all ( this . pushRoomStateTasks ) ;
12551255 while ( this . pushRoomStateTasks . size > 0 ) ;
12561256 await this . flushRoomStateTask ;
12571257 }
Original file line number Diff line number Diff line change @@ -191,7 +191,9 @@ export class WidgetApi extends EventEmitter {
191191 * @throws Throws if the capabilities negotiation has already started.
192192 */
193193 public requestCapabilities ( capabilities : Capability [ ] ) : void {
194- capabilities . forEach ( ( cap ) => this . requestCapability ( cap ) ) ;
194+ for ( const cap of capabilities ) {
195+ this . requestCapability ( cap ) ;
196+ }
195197 }
196198
197199 /**
You can’t perform that action at this time.
0 commit comments