File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,9 @@ window.__usePendingCallbacks = false;
1313window . __pendingCallbacks = [ ] ;
1414window . __flushOne = ( ) => window . __pendingCallbacks . shift ( ) ?.( ) ;
1515window . __flushAll = ( ) => {
16- for ( const callback of window . __pendingCallbacks ) {
17- callback ( ) ;
16+ while ( window . __pendingCallbacks . length ) {
17+ window . __flushOne ( ) ;
1818 }
19- window . __pendingCallbacks = [ ] ;
2019} ;
2120
2221export const asyncCallback = ( callback : ( ) => void , delay : number ) => {
Original file line number Diff line number Diff line change @@ -26,7 +26,9 @@ export default class ChatPageObject extends BaseExamplePage {
2626 await this . browser . execute ( ( ) => ( window . __usePendingCallbacks = true ) ) ;
2727 }
2828 async flushOne ( ) {
29- await this . browser . execute ( ( ) => window . __flushOne ( ) ) ;
29+ await this . browser . execute ( ( ) => {
30+ window . __flushOne ( ) ;
31+ } ) ;
3032 }
3133
3234 countChatBubbles ( ) {
You can’t perform that action at this time.
0 commit comments