From 51e1ffebdf692f1e38adcc1f6bebc67669275ebc Mon Sep 17 00:00:00 2001 From: Xiaoming Liu <13118619+happier2@users.noreply.github.com> Date: Wed, 22 Nov 2017 15:44:52 +0800 Subject: [PATCH] fixed clearNotices effects in global model (#266) Reorder the process in "clearNotices" --- src/models/global.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/models/global.js b/src/models/global.js index 91127ed2..8af75a6a 100644 --- a/src/models/global.js +++ b/src/models/global.js @@ -22,16 +22,15 @@ export default { }); }, *clearNotices({ payload }, { put, select }) { + yield put({ + type: 'saveClearedNotices', + payload, + }); const count = yield select(state => state.global.notices.length); yield put({ type: 'user/changeNotifyCount', payload: count, }); - - yield put({ - type: 'saveClearedNotices', - payload, - }); }, }, -- GitLab