From 74487c655d2d7b37d578b6e02c40d92916bc03e2 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 16 Feb 2017 09:22:44 +0000 Subject: [PATCH] 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. --- src/components/structures/login/Registration.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/structures/login/Registration.js b/src/components/structures/login/Registration.js index fe9fd30062..db1147a5d2 100644 --- a/src/components/structures/login/Registration.js +++ b/src/components/structures/login/Registration.js @@ -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) => {