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) => { ...@@ -22,8 +22,8 @@ export const fetchBranches = ({ commit, dispatch, state }, query) => {
.get(state.branchesEndpoint, { .get(state.branchesEndpoint, {
params: { search: query }, params: { search: query },
}) })
.then(({ data }) => { .then(({ data = [] }) => {
commit(types.RECEIVE_BRANCHES_SUCCESS, data.Branches || []); commit(types.RECEIVE_BRANCHES_SUCCESS, data.Branches?.length ? data.Branches : data);
}) })
.catch(() => { .catch(() => {
createFlash({ message: PROJECT_BRANCHES_ERROR }); 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