Commit 102c5dd5 authored by jboyson's avatar jboyson

Implememn excellent suggestion from @vitallium

parent 58c181f6
......@@ -71,12 +71,11 @@ export default {
return (this.glFeatures.mergeRequestWidgetGraphql ? this.state : this.mr).targetBranch;
},
shouldRemoveSourceBranch() {
if (this.glFeatures.mergeRequestWidgetGraphql) {
if (this.state.shouldRemoveSourceBranch === false) return false;
return this.state.shouldRemoveSourceBranch || this.state.forceRemoveSourceBranch;
}
if (!this.glFeatures.mergeRequestWidgetGraphql) return this.mr.shouldRemoveSourceBranch;
if (!this.state.shouldRemoveSourceBranch) return false;
return this.mr.shouldRemoveSourceBranch;
return this.state.shouldRemoveSourceBranch || this.state.forceRemoveSourceBranch;
},
autoMergeStrategy() {
return (this.glFeatures.mergeRequestWidgetGraphql ? this.state : this.mr).autoMergeStrategy;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment