If a referrer hasn't been specified, use empty string

This is interpretted by the RTS as a non-referred team member who still needs the team token to access their welcome page etc.
pull/21833/head
Luke Barnard 2017-02-16 09:22:44 +00:00
parent ebe7ec4000
commit 74487c655d
1 changed files with 4 additions and 6 deletions

View File

@ -218,13 +218,11 @@ module.exports = React.createClass({
// will just nop. The point of this being we might not have the email address
// that the user registered with at this stage (depending on whether this
// is the client they initiated registration).
if (
self._rtsClient &&
self.props.referrer
) {
// Track referral, get team_token in order to retrieve team config
if (self._rtsClient) {
// Track referral if self.props.referrer set, get team_token in order to
// retrieve team config and see welcome page etc.
self._rtsClient.trackReferral(
self.props.referrer,
self.props.referrer || '', // Default to empty string = not referred
self.registerLogic.params.idSid,
self.registerLogic.params.clientSecret
).then((data) => {