Commit 834cc1b8 authored by Simon Knox's avatar Simon Knox

fix error in tests when boardApp element doesn't exist

parent ca171eed
......@@ -115,9 +115,6 @@ export default {
}
return 'Edit board';
},
milestoneToggleText() {
return this.board.milestone ? this.board.milestone.title : 'Milestone';
},
expandButtonText() {
return this.expanded ? 'Collapse' : 'Expand';
},
......
......@@ -12,15 +12,17 @@ class BoardsStoreEE {
this.removePromotion();
};
this.store.boardConfig = {
milestoneId: parseInt(this.$boardApp.dataset.boardMilestoneId, 10),
milestoneTitle: this.$boardApp.dataset.boardMilestoneTitle,
assigneeUsername: this.$boardApp.dataset.boardAssigneeUsername,
labels: JSON.parse(this.$boardApp.dataset.labels || []),
weight: parseInt(this.$boardApp.dataset.boardWeight, 10),
};
this.store.cantEdit = [];
this.initBoardFilters();
if (this.$boardApp) {
this.store.boardConfig = {
milestoneId: parseInt(this.$boardApp.dataset.boardMilestoneId, 10),
milestoneTitle: this.$boardApp.dataset.boardMilestoneTitle,
assigneeUsername: this.$boardApp.dataset.boardAssigneeUsername,
labels: JSON.parse(this.$boardApp.dataset.labels || []),
weight: parseInt(this.$boardApp.dataset.boardWeight, 10),
};
this.store.cantEdit = [];
this.initBoardFilters();
}
}
initBoardFilters() {
......
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