Skip to content

Commit

Permalink
Merge pull request #25 from translationCoreApps/feature/ih-578
Browse files Browse the repository at this point in the history
Fix issue with unfinished books
  • Loading branch information
mannycolon committed Feb 3, 2017
2 parents 4c9b252 + 75967bb commit 226fe6a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Container.js
Expand Up @@ -45,8 +45,12 @@ class Container extends React.Component {
for (var group in groups) {
for (var item in groups[group].checks) {
var co = groups[group].checks[item];
var targetAtVerse = targetLanguage[co.chapter][co.verse];
groups[group].checks[item].targetLanguage = targetAtVerse;
try {
var targetAtVerse = targetLanguage[co.chapter][co.verse];
groups[group].checks[item].targetLanguage = targetAtVerse;
} catch (err) {
//Happens with incomplete books.
}
}
}
api.putDataInCheckStore(NAMESPACE, 'groups', groups);
Expand Down Expand Up @@ -211,7 +215,7 @@ class Container extends React.Component {
currentFile = TranslationAcademyObject[file].file;
let title = currentFile.match(/title: .*/)[0].replace('title: ', '');
currentFile = currentFile.replace(/---[\s\S]+---/g, '');
currentFile = '## ' + title + '\n' + currentFile;
currentFile = '## ' + title + '\n' + currentFile;
}catch(e){
}
return (
Expand Down

0 comments on commit 226fe6a

Please sign in to comment.