From 846038a69c4cde10417ce54b280de3624d87d45c Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 29 Mar 2019 12:39:29 +0800 Subject: [PATCH] notice-controller - make markAllNoticesRead sync --- app/scripts/notice-controller.js | 2 +- test/unit/app/controllers/notice-controller-test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/scripts/notice-controller.js b/app/scripts/notice-controller.js index 050fca9c8..63b422c5b 100644 --- a/app/scripts/notice-controller.js +++ b/app/scripts/notice-controller.js @@ -58,7 +58,7 @@ module.exports = class NoticeController extends EventEmitter { } } - async markAllNoticesRead () { + markAllNoticesRead () { const noticeList = this.getNoticesList() noticeList.forEach(notice => { notice.read = true diff --git a/test/unit/app/controllers/notice-controller-test.js b/test/unit/app/controllers/notice-controller-test.js index d550d86cd..caa50a03e 100644 --- a/test/unit/app/controllers/notice-controller-test.js +++ b/test/unit/app/controllers/notice-controller-test.js @@ -57,7 +57,7 @@ describe('notice-controller', function () { noticeController.setNoticesList(testList) - await noticeController.markAllNoticesRead() + noticeController.markAllNoticesRead() const unreadNotices = noticeController.getUnreadNotices() assert.equal(unreadNotices.length, 0)