Skip to content

Commit 8f9c729

Browse files
authored
Merge pull request #4477 from appirio-tech/feature/milestone-customer-approval
[HOTFIX][DEV] Fixed adding copilot bug in new milestone management
2 parents 853fb37 + a7df2c8 commit 8f9c729

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/projects/detail/components/SimplePlan/components/AddCopilotsSidebar/AddCopilotsSidebar.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ class AddCopilotsSidebar extends React.Component {
3131
}
3232

3333
componentDidMount() {
34-
document.addEventListener('click', this.onClickOutside)
34+
document.addEventListener('mousedown', this.onClickOutside)
3535
}
3636

3737
componentWillUnmount() {
38-
document.removeEventListener('click', this.onClickOutside)
38+
document.removeEventListener('mousedown', this.onClickOutside)
3939
}
4040

4141
render() {

src/projects/detail/components/SimplePlan/components/MilestonesApprovalNotification/MilestonesApprovalNotification.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ class MilestonesApprovalNotification extends React.Component {
2828
}
2929

3030
findLatest(approvals) {
31+
if(!approvals) return {}
32+
3133
let d = null
3234
let maxIndex = 0
3335
for(let index = 0; index < approvals.length; index ++) {

0 commit comments

Comments
 (0)