Skip to content

Commit

Permalink
this.data does not have closed property
Browse files Browse the repository at this point in the history
gitlab api does not have ```closed``` property in the json data.
```state``` property contains either ```closed``` or ```opened``` value instead.
Please, refer https://docs.gitlab.com/ee/api/issues.html
  • Loading branch information
hkmoon authored Feb 11, 2019
1 parent 5bee6a7 commit d74a8af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/models/issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class issue extends hasTimes {
}

get closed() {
return !!this.data.closed;
return this.data.state === 'closed';
}

get updated_at() {
Expand Down Expand Up @@ -111,4 +111,4 @@ class issue extends hasTimes {
}
}

module.exports = issue;
module.exports = issue;

0 comments on commit d74a8af

Please sign in to comment.