fix: merge option changes on polling (#2502)

* fix: merge option changes on polling
pull/3545/head
Ritik Kapoor 2024-08-13 23:10:35 +00:00 committed by Harness
parent 313c706be7
commit 1091cc3397
1 changed files with 1 additions and 1 deletions

View File

@ -209,7 +209,7 @@ export const PullRequestActionsBox: React.FC<PullRequestActionsBoxProps> = ({
if (allowedStrats) {
const matchingMethods = mergeOptions.filter(option => allowedStrats.includes(option.method))
if (matchingMethods.length > 0) {
if (!matchingMethods.includes(mergeOption)) {
if (!matchingMethods.map(({ method }) => method).includes(mergeOption.method)) {
setMergeOption(matchingMethods[0])
} else if (mergeOption) {
setMergeOption(mergeOption)