diff --git a/www/js/utils/scrIDs.js b/www/js/utils/scrIDs.js index 282e4fb8..412f2b6e 100755 --- a/www/js/utils/scrIDs.js +++ b/www/js/utils/scrIDs.js @@ -47,8 +47,8 @@ define(function (require) { { id: "JOS", name: "Joshua", - num: [18, 24, 17, 24, 15, 27, 26, 35, 27, 43, 23, 24, 33, 15, 63, 10, 18, 28, 51, 9, 45, 34, 16, 33], - chapters: 24 + num: 6, + chapters: [18, 24, 17, 24, 15, 27, 26, 35, 27, 43, 23, 24, 33, 15, 63, 10, 18, 28, 51, 9, 45, 34, 16, 33] }, { id: "JDG", diff --git a/www/js/views/DocumentViews.js b/www/js/views/DocumentViews.js index 33bf5df9..74d642e5 100644 --- a/www/js/views/DocumentViews.js +++ b/www/js/views/DocumentViews.js @@ -3084,11 +3084,11 @@ define(function (require) { // reset the objects to the beginning of this book (chapter 1) chapterID = book.get("chapters")[0]; // first chapter of the current book (UUID string) chapter = chapters.where({chapterid: chapterID})[0]; // chapter object from chapters list - if (chapter === null) { + if (typeof(chapter) === "undefined" || chapter === null) { // Ugh. Can't find the chapter in the list. This _might_ mean that we had a corruption // when deleting a chapter / book earlier -- error out. errMsg = i18n.t("view.dscErrMergeNoChapID", {chapter: chapterID}); - return false; + importFail(new Error(errMsg)); } chapterName = chapter.get("name"); // get the existing source phrases in this chapter (empty if this is a new import)