Update Mermaid to v8.2.6
This fixes a regression where an underscore in labels no longer worked: https://github.com/knsv/mermaid/releases
This commit is contained in:
parent
fb63a00ea4
commit
526ea7c5b6
3 changed files with 23 additions and 1 deletions
|
@ -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 },
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
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('');
|
||||
|
|
Loading…
Reference in a new issue