diff options
author | Alex Yatskov <alex@foosoft.net> | 2017-04-09 11:42:20 -0700 |
---|---|---|
committer | Alex Yatskov <alex@foosoft.net> | 2017-04-09 11:42:20 -0700 |
commit | 3523b85be0be618b00cd9b6992aaf255de12ebfb (patch) | |
tree | 342fbe2a0e1ef7319e05dd8ce7f1e2ab7646abbc /ext/mixed/js/display.js | |
parent | 1b49f91a9b252447ab791ccef7b26a0b8b6062dd (diff) | |
parent | 56fe02e9453f2b40a8af52b6f8a8125d67d2ad9f (diff) |
Merge branch 'master' into firefox-amo
Diffstat (limited to 'ext/mixed/js/display.js')
-rw-r--r-- | ext/mixed/js/display.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index 64d462ae..0167c605 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -74,7 +74,10 @@ class Display { if (context) { for (const definition of definitions) { - definition.cloze = clozeBuild(context.sentence, definition.source); + if (context.sentence) { + definition.cloze = clozeBuild(context.sentence, definition.source); + } + definition.url = context.url; } } @@ -108,7 +111,10 @@ class Display { if (context) { for (const definition of definitions) { - definition.cloze = clozeBuild(context.sentence); + if (context.sentence) { + definition.cloze = clozeBuild(context.sentence); + } + definition.url = context.url; } } |