Skip to content

Commit

Permalink
I18N-1313 - Fix issue when uploading screenshots (#163)
Browse files Browse the repository at this point in the history
Fixed the issue with screenshots uploading
  • Loading branch information
DarKhaos authored Oct 18, 2024
1 parent 9e0acd4 commit fcf3076
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@ const BranchesScreenshotUploadDataSource = {
screenshot.locale = repository.sourceLocale;
screenshot.branch = branchStatistic.branch;

const { branchTextUnitStatistics } = BranchTextUnitsStore.getState();
let branchTextUnitStatistics;
if (branchStatistic.isPaginated) {
branchTextUnitStatistics = BranchTextUnitsStore.getState().branchTextUnitStatistics;
} else {
branchTextUnitStatistics = branchStatistic.branchTextUnitStatistics;
}
branchTextUnitStatistics.forEach(branchTextUnitStatistic => {
if (BranchesStoreState.selectedBranchTextUnitIds.indexOf(branchTextUnitStatistic.id) >= 0) {

screenshot.textUnits.push(new TextUnit(new TmTextUnit(branchTextUnitStatistic.tmTextUnit.id)));
}
});
Expand Down

0 comments on commit fcf3076

Please sign in to comment.