pull/4791/head
Your Name 6 months ago
parent 089e9cdf5d
commit c7d991257b
  1. 4
      libs/remix-ui/git/src/components/panels/commands/pushpull.tsx

@ -21,14 +21,14 @@ export const PushPull = () => {
setRemoteBranch(context.currentBranch.name) setRemoteBranch(context.currentBranch.name)
setLocalBranch(context.currentBranch.name) setLocalBranch(context.currentBranch.name)
let currentUpstreamIsInRemotes = context.upstream && context.remotes.find(r => r.name === context.upstream.name) const currentUpstreamIsInRemotes = context.upstream && context.remotes.find(r => r.name === context.upstream.name)
if (!context.upstream || !currentUpstreamIsInRemotes) { if (!context.upstream || !currentUpstreamIsInRemotes) {
if (context.currentBranch && context.currentBranch.remote && context.currentBranch.remote.name) { if (context.currentBranch && context.currentBranch.remote && context.currentBranch.remote.name) {
actions.setUpstreamRemote(context.currentBranch.remote) actions.setUpstreamRemote(context.currentBranch.remote)
} else { } else {
if (context.remotes && context.remotes.length > 0) { if (context.remotes && context.remotes.length > 0) {
actions.setUpstreamRemote(context.remotes[0]) actions.setUpstreamRemote(context.remotes[0])
} else{ } else {
actions.setUpstreamRemote(null) actions.setUpstreamRemote(null)
} }
} }

Loading…
Cancel
Save