# HG changeset patch # User ymh # Date 1497533256 -7200 # Node ID 7f940dbb60a63c2a834c281f7be74750724b086e # Parent cb014270bdc655c95c87905926da4d9ade12f9b2 Use yields instead of promises diff -r cb014270bdc6 -r 7f940dbb60a6 client/src/sagas/index.js --- a/client/src/sagas/index.js Thu Jun 15 13:00:32 2017 +0200 +++ b/client/src/sagas/index.js Thu Jun 15 15:27:36 2017 +0200 @@ -45,10 +45,9 @@ const { _id } = action.session; let session; - const response = yield sessionsDB.get(_id).then(function(doc) { - session = Object.assign({}, doc, action.values); - return sessionsDB.put(session); - }); + const doc = yield sessionsDB.get(_id); + session = Object.assign({}, doc, action.values); + const response = yield sessionsDB.put(session); yield put({ type: types.UPDATE_SESSION,