blob: 3e924ebd9d5d51f29d4a0e9182c4c3b64a5ab232 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import store from '~/mr_notes/stores';
export function initOverviewTabCounter() {
const discussionsCount = document.querySelector('.js-discussions-count');
store.watch(
(state, getters) => getters.discussionTabCounter,
(val) => {
if (typeof val !== 'undefined') {
discussionsCount.textContent = val;
}
},
);
}
|