Skip to content

Commit c69401c

Browse files
committed
Merge branch 'develop'
2 parents a0133c9 + 3645f8c commit c69401c

File tree

3 files changed

+34
-10
lines changed

3 files changed

+34
-10
lines changed

package-lock.json

Lines changed: 27 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"lint:js": "./node_modules/.bin/eslint --ext .js,.jsx .",
2929
"test": "npm run lint && npm run jest"
3030
},
31-
"version": "0.0.6",
31+
"version": "0.0.7",
3232
"dependencies": {
3333
"isomorphic-fetch": "^2.2.1",
3434
"le_node": "^1.7.0",
@@ -42,7 +42,7 @@
4242
"redux": "^3.6.0",
4343
"redux-actions": "^2.0.1",
4444
"tc-accounts": "https://github.com/appirio-tech/accounts-app.git#dev",
45-
"topcoder-react-utils": "^0.3.11"
45+
"topcoder-react-utils": "^0.3.12"
4646
},
4747
"devDependencies": {
4848
"autoprefixer": "^8.2.0",

src/reducers/auth.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,19 @@ function create(initialState) {
7373
* @returns {Promise}
7474
* @resolves {Function(state, action): state} New reducer.
7575
*/
76-
export function factory(options = {}) {
76+
export async function factory(options = {}) {
7777
const state = {
7878
tokenV2: _.get(options.auth, 'tokenV2'),
7979
tokenV3: _.get(options.auth, 'tokenV3'),
8080
};
8181

8282
if (state.tokenV3) {
8383
state.user = decodeToken(state.tokenV3);
84-
return redux.resolveAction(actions.auth.loadProfile(state.tokenV3))
85-
.then(res => create(onProfileLoaded(state, res), options.mergeReducers));
84+
let a = actions.auth.loadProfile(state.tokenV3);
85+
a = await redux.resolveAction(a);
86+
return create(onProfileLoaded(state, a));
8687
}
87-
return Promise.resolve(create(state, options.mergeReducers));
88+
return create(state);
8889
}
8990

9091
/**

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy