From ec028d7a591291e1053e69c98924de6055676661 Mon Sep 17 00:00:00 2001 From: Mrugesh Mohapatra Date: Sat, 30 Jun 2018 01:31:56 +0530 Subject: [PATCH] refactor: Coding style changes --- common/models/User-Identity.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/models/User-Identity.js b/common/models/User-Identity.js index da883eaa4a..b3913ba321 100644 --- a/common/models/User-Identity.js +++ b/common/models/User-Identity.js @@ -33,8 +33,7 @@ export default function(UserIdent) { // get the social provider data and the external id from auth0 profile.id = profile.id || profile.openid; const auth0IdString = '' + profile.id; - const socialExtId = auth0IdString.substring(auth0IdString.indexOf('|') + 1); - const provider = auth0IdString.substring(0, auth0IdString.indexOf('|')); + const [ provider, socialExtId ] = auth0IdString.split('|'); const query = { where: { provider: provider,