Skip to content

Commit

Permalink
not able access branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
sijumoncy committed Oct 26, 2023
1 parent c89b06b commit 773419a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions renderer/src/components/Sync/Sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 63 in renderer/src/components/Sync/Sync.js

View workflow job for this annotation

GitHub Actions / Lint Run

Unexpected console statement

Check warning on line 63 in renderer/src/components/Sync/Sync.js

View workflow job for this annotation

GitHub Actions / Lint Run

Unexpected console statement
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 {
Expand Down

0 comments on commit 773419a

Please sign in to comment.