From 8d0264f3af476d1a293d5cffa075618b08888779 Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Tue, 10 May 2022 14:52:11 -0500 Subject: [PATCH] Clean up code --- helpers/stork/browser.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/helpers/stork/browser.js b/helpers/stork/browser.js index af6e0f4..6e5ef35 100644 --- a/helpers/stork/browser.js +++ b/helpers/stork/browser.js @@ -23,7 +23,8 @@ export class StorkClient { return this.stork.search( this.name, query ) } - // Loads the Stork executables into the browser. + // Loads the Stork WASM and Index into the browser on first query + // so that we don;t have to load them initially. async lazyQuery ( query ) { if ( !this.isSetup ) await this.setup() @@ -63,7 +64,7 @@ export class StorkClient { // This silly `then` call turns a [(void), (void)] into a (void), which is // only necessary to make Typescript happy. // You begin to wonder if you write Typescript code, or if Typescript code writes you. - await Promise.all([initPromise, downloadPromise]).then() + await Promise.all([initPromise, downloadPromise]) // Mark setup as complete this.setupState = 'complete'