Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Special case where we're trying to set the flags on a null sourcephrase if the data before v1 is identical. Looks like this bug was introduced with adapt-it#187
  • Loading branch information
eb1 committed Sep 19, 2023
1 parent 03766e3 commit a730b6d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion www/js/views/DocumentViews.js
Original file line number Diff line number Diff line change
Expand Up @@ -3121,7 +3121,11 @@ define(function (require) {
}
// default from AI desktop -- set end Free Translation bit to the last SP before a new verse
if (arr[i] === "\\v") {
sp.set("flags", END_FT_BIT, {silent: true});
// if there's a previous sp, set the flags
// (special case -- for pre-verse1 data that gets merged, there's no previous sourcephrase defined)
if (sp !== null) {
sp.set("flags", END_FT_BIT, {silent: true});
}
}
mkr = markerList.where({name: arr[i].substr(arr[i].indexOf("\\") + 1)});
if (mkr.length > 0 && mkr[0].get("endMarker")) {
Expand Down

0 comments on commit a730b6d

Please sign in to comment.