From 773419aacb38845e0519fb998d02255f7888bdf7 Mon Sep 17 00:00:00 2001 From: sijumoncy <72241997+sijumoncy@users.noreply.github.com> Date: Thu, 26 Oct 2023 17:29:02 +0530 Subject: [PATCH] not able access branch name --- renderer/src/components/Sync/Sync.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/renderer/src/components/Sync/Sync.js b/renderer/src/components/Sync/Sync.js index 302d5cf38..d7049387e 100644 --- a/renderer/src/components/Sync/Sync.js +++ b/renderer/src/components/Sync/Sync.js @@ -60,11 +60,12 @@ export default function Sync() { }; const handleOfflineSync = async (currentRepo, currentAuth) => { - if (currentAuth && currentRepo && selectedGiteaProjectBranch?.name) { + console.log({ currentRepo, currentAuth, selectedGiteaProjectBranch }, selectedGiteaProjectBranch[0]?.name); + if (currentAuth && currentRepo && selectedGiteaProjectBranch[0]?.name) { logger.debug('Sync.js', 'in offlineSync Started'); - await downloadFromGitea(currentRepo, currentAuth, setSyncProgress, notifyStatus, setSelectedGiteaProject, addNotification, selectedGiteaProjectBranch.name, setPullPopup, setPullData, t); + await downloadFromGitea(currentRepo, currentAuth, setSyncProgress, notifyStatus, setSelectedGiteaProject, addNotification, selectedGiteaProjectBranch[0].name, setPullPopup, setPullData, t); logger.debug('Sync.js', 'in offlineSync Finished'); - } else if (!selectedGiteaProjectBranch?.name) { + } else if (!selectedGiteaProjectBranch[0]?.name) { logger.debug('Sync.js', 'Do select a branch'); notifyStatus('warning', 'Do select a branch'); } else {