Commit 526ea7c5 authored by Stan Hu's avatar Stan Hu Committed by Filipa Lacerda

Update Mermaid to v8.2.6

This fixes a regression where an underscore in labels no
longer worked:
https://github.com/knsv/mermaid/releases
parent fb63a00e
......@@ -25,6 +25,11 @@ export default endpoint => {
const names = [...document.querySelectorAll('.js-branch-item')].map(
({ dataset }) => dataset.name,
);
if (names.length === 0) {
return true;
}
return axios
.get(endpoint, {
params: { names },
......
---
title: Skip requesting diverging commit counts if no branches are listed
merge_request: 32496
author:
type: performance
......@@ -25,13 +25,25 @@ describe('Divergence graph', () => {
mock.restore();
});
it('calls axos get with list of branch names', () =>
it('calls axios get with list of branch names', () =>
init('/-/diverging_counts').then(() => {
expect(axios.get).toHaveBeenCalledWith('/-/diverging_counts', {
params: { names: ['master', 'test/hello-world'] },
});
}));
describe('no branches listed', () => {
beforeEach(() => {
document.body.innerHTML = `<div></div>`;
});
it('avoids requesting diverging commit counts', () => {
expect(axios.get).not.toHaveBeenCalledWith('/-/diverging_counts');
init('/-/diverging_counts');
});
});
it('creates Vue components', () =>
init('/-/diverging_counts').then(() => {
expect(document.querySelector('[data-name="master"]').innerHTML).not.toEqual('');
......
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