Skip to content

Commit 1c72399

Browse files
author
Scott Prue
committed
Return userData and throw error in createUserProfile (since it is now async)
1 parent 1696258 commit 1c72399

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/actions/auth.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ export const createUserProfile = async (
281281
) => {
282282
const { _: { config } } = firebase
283283
if (!config.userProfile || (!firebase.database && !firebase.firestore)) {
284-
return Promise.resolve(userData)
284+
return userData
285285
}
286286
// use profileFactory if it exists in config
287287
if (typeof config.profileFactory === 'function') {
@@ -295,7 +295,7 @@ export const createUserProfile = async (
295295
err.message || err
296296
)
297297
/* eslint-enable no-console */
298-
return Promise.reject(err)
298+
throw err
299299
}
300300
}
301301

0 commit comments

Comments
 (0)