Skip to content

Commit

Permalink
Ensures hearingImpaired is a boolean in search.js
Browse files Browse the repository at this point in the history
  • Loading branch information
same31 committed Apr 2, 2018
1 parent 3d64ab3 commit 22dac5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function findSubtitles (body, languages) {
// ===============================
while ((versionMatch = versionRegExp.exec(body)) !== null) {
version = versionMatch[1].toUpperCase();
hearingImpaired = ~versionMatch[2].indexOf('Hearing Impaired');
hearingImpaired = versionMatch[2].indexOf('Hearing Impaired') !== -1;

while ((subInfoMatch = subInfoRegExp.exec(versionMatch[2])) !== null) {
notCompleted = subInfoMatch[2];
Expand Down

0 comments on commit 22dac5c

Please sign in to comment.