diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-01-19 20:48:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-19 20:48:10 -0500 |
commit | 3c51bf2a0be7c35f86d2da8c381453b95e6414bf (patch) | |
tree | 7cd005f7b0cc550c5d447b1ceb76867462d55408 /ext/mixed/js | |
parent | 21fce9f3d98e4381f8813cf9c63410ca1dbd7f91 (diff) |
Fix DisplayGenerator not working on pitch-accents-preview.html (#1276)
Diffstat (limited to 'ext/mixed/js')
-rw-r--r-- | ext/mixed/js/display-generator.js | 3 |
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); } |