aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mixed/js')
-rw-r--r--ext/mixed/js/display-generator.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/mixed/js/display-generator.js b/ext/mixed/js/display-generator.js
index 0102afbc..0324f16a 100644
--- a/ext/mixed/js/display-generator.js
+++ b/ext/mixed/js/display-generator.js
@@ -22,7 +22,7 @@
*/
class DisplayGenerator {
- constructor({japaneseUtil, mediaLoader, hotkeyHelpController}) {
+ constructor({japaneseUtil, mediaLoader, hotkeyHelpController=null}) {
this._japaneseUtil = japaneseUtil;
this._mediaLoader = mediaLoader;
this._hotkeyHelpController = hotkeyHelpController;
@@ -38,6 +38,7 @@ class DisplayGenerator {
updateHotkeys() {
const hotkeyHelpController = this._hotkeyHelpController;
+ if (hotkeyHelpController === null) { return; }
for (const template of this._templates.getAllTemplates()) {
hotkeyHelpController.setupNode(template.content);
}