From dfcb610df184f3c621fb9e1b16ab504c0a9e10cf Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Fri, 23 Jul 2021 20:05:26 +0000 Subject: [PATCH] Remove console.log --- ui/index.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ui/index.js b/ui/index.js index 1a7b78e..42260b9 100644 --- a/ui/index.js +++ b/ui/index.js @@ -79,12 +79,15 @@ class App extends Component { type: 'Config', config }); - do { + while (true) { await new Promise(resolve => setTimeout(resolve, 100)); - } while ( - !(await this.connection.schedule(context => context.hasPendingEvent())) - ); - console.log('Event!'); + let hasPendingEvent = await this.connection.schedule(context => + context.hasPendingEvent() + ); + if (hasPendingEvent) { + break; + } + } } }