From fcf30767a0a588fe8d81c0c957019e1bac557005 Mon Sep 17 00:00:00 2001 From: DarKhaos <40587669+DarKhaos@users.noreply.github.com> Date: Fri, 18 Oct 2024 04:23:27 -0400 Subject: [PATCH] I18N-1313 - Fix issue when uploading screenshots (#163) Fixed the issue with screenshots uploading --- .../branches/BranchesScreenshotUploadDataSource.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webapp/src/main/resources/public/js/actions/branches/BranchesScreenshotUploadDataSource.js b/webapp/src/main/resources/public/js/actions/branches/BranchesScreenshotUploadDataSource.js index 90a92117d..d473f0d96 100644 --- a/webapp/src/main/resources/public/js/actions/branches/BranchesScreenshotUploadDataSource.js +++ b/webapp/src/main/resources/public/js/actions/branches/BranchesScreenshotUploadDataSource.js @@ -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))); } });