Commit df8a5e26 authored by Clement Ho's avatar Clement Ho

[skip ci] Fix sidebar on assignees page

parent 76d03f69
......@@ -8,7 +8,14 @@ document.addEventListener('DOMContentLoaded', () => {
const mediator = new Mediator(gl.sidebarOptions);
mediator.fetch();
new Vue(sidebarAssignees).$mount('#js-vue-sidebar-assignees');
const sidebarAssigneesEl = document.querySelector('#js-vue-sidebar-assignees');
// Only create the sidebarAssignees vue app if it is found in the DOM
// We currently do not use sidebarAssignees for the MR page
if (sidebarAssigneesEl) {
new Vue(sidebarAssignees).$mount(sidebarAssigneesEl);
}
new Vue(sidebarTimeTracking).$mount('#issuable-time-tracker');
});
......@@ -19,10 +19,12 @@ export default class SidebarStore {
}
processUserData(data) {
this.renderedUsers = data.assignees;
if (data.assignees) {
this.renderedUsers = data.assignees;
this.removeAllUserIds();
this.renderedUsers.map(u => this.addUserId(u.id));
this.removeAllUserIds();
this.renderedUsers.map(u => this.addUserId(u.id));
}
}
processTimeTrackingData(data) {
......
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