diff options
author | siikamiika <siikamiika@users.noreply.github.com> | 2020-02-13 16:26:45 +0200 |
---|---|---|
committer | siikamiika <siikamiika@users.noreply.github.com> | 2020-02-13 16:26:45 +0200 |
commit | d7e1ef01d8af4a315a31364eb5138e24a132ea1e (patch) | |
tree | e436e9fe0ffee2d7290ca737bcd5014a2ae61822 /ext/bg/js/search.js | |
parent | 38a6433a46a4259666864a57c5adbd58cb59db86 (diff) |
use Promise.all to await dependencies
Diffstat (limited to 'ext/bg/js/search.js')
-rw-r--r-- | ext/bg/js/search.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js index 86ed675a..bb27205c 100644 --- a/ext/bg/js/search.js +++ b/ext/bg/js/search.js @@ -47,9 +47,9 @@ class DisplaySearch extends Display { async prepare() { try { - await super.prepare(); - - await this.queryParser.prepare(); + const superPromise = super.prepare(); + const queryParserPromise = this.queryParser.prepare(); + await Promise.all([superPromise, queryParserPromise]); const {queryParams: {query='', mode=''}} = parseUrl(window.location.href); |