diff options
author | siikamiika <siikamiika@users.noreply.github.com> | 2020-02-13 01:43:01 +0200 |
---|---|---|
committer | siikamiika <siikamiika@users.noreply.github.com> | 2020-02-13 01:43:01 +0200 |
commit | 93eaee9765c7478ee5ad7485d664b86acf3d4510 (patch) | |
tree | cb50bd70c2f49977b5b3a71aa9dded790bac4e0b /ext/mixed/js/display.js | |
parent | 65dfb855fb23d8279367651ab650f3347aa236ac (diff) |
simplify DisplayGenerator initialization
Diffstat (limited to 'ext/mixed/js/display.js')
-rw-r--r-- | ext/mixed/js/display.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index a6cfe848..cee63d9b 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -243,6 +243,7 @@ class Display { } async initialize(options=null) { + await this.displayGenerator.prepare(); await this.updateOptions(options); yomichan.on('optionsUpdate', () => this.updateOptions(null)); } @@ -365,10 +366,7 @@ class Display { window.focus(); } - if (!this.displayGenerator.isInitialized()) { - await this.displayGenerator.initialize(); - if (this.setContentToken !== token) { return; } - } + if (this.setContentToken !== token) { return; } this.definitions = definitions; if (context.disableHistory) { @@ -429,10 +427,7 @@ class Display { window.focus(); } - if (!this.displayGenerator.isInitialized()) { - await this.displayGenerator.initialize(); - if (this.setContentToken !== token) { return; } - } + if (this.setContentToken !== token) { return; } this.definitions = definitions; if (context.disableHistory) { |