Skip to content

Commit

Permalink
profileDecorator backward compatibility with deprecation warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
prescottprue committed Jan 20, 2017
1 parent e553712 commit 8f9cf1e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/actions/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ export const createUserProfile = (dispatch, firebase, userData, profile) => {
if (isFunction(config.profileFactory)) {
profile = config.profileFactory(userData, profile)
}
if (isFunction(config.profileDecorator)) {
if (isFunction(console.warn)) { // eslint-disable-line no-console
console.warn('profileDecorator is Depreceated and will be removed in future versions. Please use profileFactory.') // eslint-disable-line no-console
}
profile = config.profileDecorator(userData, profile)
}
// Check for user's profile at userProfile path if provided
return database()
.ref()
Expand Down

0 comments on commit 8f9cf1e

Please sign in to comment.