-
Notifications
You must be signed in to change notification settings - Fork 362
Fix non existant ayat #708
Changes from 5 commits
e63c1d7
8ac3512
f039028
daba152
012fdea
44e74c2
8b06ece
1001d8c
31ef1e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,6 +76,8 @@ export default { | |
'nav.navigate': 'Bağlantılar', // there is no exact translation for Navigate in Turkish | ||
'nav.legacySite': 'Eski Siteye Git Quran.com', | ||
|
||
'login.message': 'Tüm yer işaretlerinizi, notlarınızı ve etkinliklerinizi saklamak için Quran.com\'a giriş yapın.' | ||
'login.message': 'Tüm yer işaretlerinizi, notlarınızı ve etkinliklerinizi saklamak için Quran.com\'a giriş yapın.', | ||
|
||
'chapter.index.ayahNotFound': 'Ayet bulunamadı' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated |
||
} | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,13 +9,15 @@ export default function reducer(state = {}, action = {}) { | |
const verses = action.result.entities.verses; | ||
const classNames = {}; | ||
|
||
Object.keys(verses).forEach((ayahId) => { | ||
const verse = verses[ayahId]; | ||
if (verses !== undefined) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please should this be if (!verses)? Explicit checks for undefined would miss out on null values. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. agreed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if(verses) {
...
} should be enough, it will check for null, undefined and falsey There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done in 44e74c2 |
||
Object.keys(verses).forEach((ayahId) => { | ||
const verse = verses[ayahId]; | ||
|
||
if (!state[`p${verse.pageNumber}`]) { | ||
classNames[`p${verse.pageNumber}`] = false; | ||
} | ||
}); | ||
if (!state[`p${verse.pageNumber}`]) { | ||
classNames[`p${verse.pageNumber}`] = false; | ||
} | ||
}); | ||
} | ||
|
||
return { | ||
...state, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: should this be named AyahNotFound to tally with the message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated