Skip to content

Commit

Permalink
fix(dicts): fix audio link
Browse files Browse the repository at this point in the history
Closes #175
  • Loading branch information
crimx committed Jul 27, 2018
1 parent cfc43b1 commit 8b7e140
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/dictionaries/cambridge/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ function handleDOM (
$posHeader.querySelectorAll('.pron-info').forEach($pron => {
const $btn = $pron.querySelector<HTMLSpanElement>('.audio_play_button')
if ($btn) {
const mp3 = $btn.dataset.srcMp3
if (mp3) {
if ($btn.dataset.srcMp3) {
const mp3 = $btn.dataset.srcMp3.replace(/^\//, 'https://dictionary.cambridge.org/')
entry.prons.push({
phsym: getText($pron),
pron: mp3,
Expand Down

0 comments on commit 8b7e140

Please sign in to comment.