From 974814daef37841ea3e1c005713d908759d4742f Mon Sep 17 00:00:00 2001 From: Chris Whitfield Date: Tue, 6 Dec 2016 14:03:26 -0800 Subject: [PATCH] Fix for bug issue when no UDB source --- src/js/database.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/database.js b/src/js/database.js index 0ea1d8e33..2e530199b 100644 --- a/src/js/database.js +++ b/src/js/database.js @@ -123,7 +123,7 @@ function DataManager(db) { getFrameUdb: function (source, chapterid, verseid) { var sources = this.getSources(); var udbsource = _.filter(sources, {'language_id': source.language_id, 'project_id': source.project_id, 'checking_level': 3, 'resource_id': 'udb'}); - var s = udbsource[0].id, + var s = udbsource[0] ? udbsource[0].id : "", r = query([ "select f.id, f.slug 'verse', f.body 'chunk', c.slug 'chapter', c.title, c.reference, f.format from frame f", "join chapter c on c.id=f.chapter_id",