Commit 356ae9af authored by jerasmus's avatar jerasmus

Fix revert commit query

Updated the query handler data contract
parent 0e81fa09
......@@ -22,8 +22,8 @@ export const fetchBranches = ({ commit, dispatch, state }, query) => {
.get(state.branchesEndpoint, {
params: { search: query },
})
.then(({ data }) => {
commit(types.RECEIVE_BRANCHES_SUCCESS, data.Branches || []);
.then(({ data = [] }) => {
commit(types.RECEIVE_BRANCHES_SUCCESS, data.Branches?.length ? data.Branches : data);
})
.catch(() => {
createFlash({ message: PROJECT_BRANCHES_ERROR });
......
---
title: Fix revert commit query
merge_request: 59356
author:
type: fixed
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