Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function getAlignedTextFromBible(contextId, bible) {
if (bible && contextId && contextId.reference &&
bible[contextId.reference.chapter] && bible[contextId.reference.chapter][contextId.reference.verse] &&
bible[contextId.reference.chapter][contextId.reference.verse].verseObjects) {
const verseObjects = bible[contextId.reference.chapter][contextId.reference.verse].verseObjects;
return getAlignedText(verseObjects, contextId.quote, contextId.occurrence);
}
}