aboutsummaryrefslogtreecommitdiff
path: root/ext/mixed
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-01-19 20:48:10 -0500
committerGitHub <noreply@github.com>2021-01-19 20:48:10 -0500
commit3c51bf2a0be7c35f86d2da8c381453b95e6414bf (patch)
tree7cd005f7b0cc550c5d447b1ceb76867462d55408 /ext/mixed
parent21fce9f3d98e4381f8813cf9c63410ca1dbd7f91 (diff)
Fix DisplayGenerator not working on pitch-accents-preview.html (#1276)
Diffstat (limited to 'ext/mixed')
-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);
}