Commit 62937d9a authored by Vitaly Slobodin's avatar Vitaly Slobodin

Merge branch '327064-fix-revert-query' into 'master'

Fix revert commit query

See merge request gitlab-org/gitlab!59356
parents a6785099 356ae9af
......@@ -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