Skip to content

Commit

Permalink
Fix bug in hebutill:
Browse files Browse the repository at this point in the history
If there is no body attribute its not add body_lang to it
  • Loading branch information
ArnonEilat committed Jul 18, 2014
1 parent 64cf287 commit dc64634
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/hebUtill.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ angular.module('HebUtill', []).factory('HebUtill', function() {
this.addLanguageAttribute = function(data) {

for (var i = 0; i < data.length; i++) {
if (isMostHebrew(data[i].body))
data[i].body_lang = "hebrew";
else
data[i].body_lang = "english";
if (data[i].body)
if (isMostHebrew(data[i].body))
data[i].body_lang = "hebrew";
else
data[i].body_lang = "english";
if (data[i].title !== undefined) {
if (isMostHebrew(data[i].title))
data[i].title_lang = "hebrew";
Expand Down

0 comments on commit dc64634

Please sign in to comment.