Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fixed an issue that was causing the wrong word to highlight
  • Loading branch information
iMoe037 committed Jun 24, 2017
commit f0ff1e7b9ce1b0507b8914342dd46f35a982c85f
8 changes: 6 additions & 2 deletions src/components/Word/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,12 @@ class Word extends Component {
const highlight = currentVerse === word.verseKey && isPlaying
? 'highlight'
: '';
const className = `${useTextFont ? 'text-' : ''}${word.className} ${word.charType} ${highlight} ${word.highlight ? word.highlight : ''}`;
const id = `word-${word.verseKey.replace(/:/, '-')}-${audioPosition}`;
const className = `${useTextFont
? 'text-'
: ''}${word.className} ${word.charType} ${highlight} ${word.highlight
? word.highlight
: ''}`;
const id = `word-${word.verseKey.replace(/:/, '-')}-${word.position}`;

if (useTextFont) {
if (word.charType === CHAR_TYPE_END) {
Expand Down