diff --git a/lib/notification-reducer.js b/lib/notification-reducer.js index b1f5c85..dc0ed1a 100644 --- a/lib/notification-reducer.js +++ b/lib/notification-reducer.js @@ -21,7 +21,7 @@ export class NotificationReducer { get notificationsForReassignedPRs() { return this.notificationsWithPullRequests.filter((notification) => { - return notification.reason === "subscribed" && notification.pull_request.assignee != this.me && notification.pull_request.assignee != "" + return notification.reason === "subscribed" && notification.pull_request.assignee != this.me && notification.pull_request.assignee !== null }); } diff --git a/test/fixtures/pr21.json b/test/fixtures/pr21.json index 8b93dca..44cc4ab 100644 --- a/test/fixtures/pr21.json +++ b/test/fixtures/pr21.json @@ -4,6 +4,7 @@ "number": 21, "state": "closed", "title": "Add support for resource-specific tags", + "assignee": null, "user": { "login": "jansiwy", "id": 610800, diff --git a/test/fixtures/pr45.json b/test/fixtures/pr45.json index 6bf8f70..7bd3e86 100644 --- a/test/fixtures/pr45.json +++ b/test/fixtures/pr45.json @@ -4,6 +4,7 @@ "number": 45, "state": "open", "title": "Breaking change: Unify support for resource-specific tags", + "assignee": "jansiwy", "user": { "login": "jansiwy", "id": 610800, diff --git a/test/reducer.js b/test/reducer.js index e28eeb7..815958a 100644 --- a/test/reducer.js +++ b/test/reducer.js @@ -46,6 +46,7 @@ describe('Reducer', async () => { 'number', 'state', 'title', + 'assignee', 'user', 'body', 'created_at',