diff --git a/dist/kano-world-sdk.js b/dist/kano-world-sdk.js index f37776b..cdccbfa 100644 --- a/dist/kano-world-sdk.js +++ b/dist/kano-world-sdk.js @@ -134,7 +134,7 @@ module.exports = function (config) { // The current website is either KW or running inside Electron, we read directly the locaStorage if (isKW || isElectron) { - p = onToken(token || localStorage.getItem('KW_TOKEN')); + return onToken(token || localStorage.getItem('KW_TOKEN')); } // Otherwise, contact KW to get the toekn throught the iframe xdAuth.getCrossToken(function (err, tk) { diff --git a/lib/core/auth.js b/lib/core/auth.js index c33c9cd..055d966 100644 --- a/lib/core/auth.js +++ b/lib/core/auth.js @@ -72,7 +72,7 @@ module.exports = function (config) { // The current website is either KW or running inside Electron, we read directly the locaStorage if (isKW || isElectron) { - p = onToken(token || localStorage.getItem('KW_TOKEN')); + return onToken(token || localStorage.getItem('KW_TOKEN')); } // Otherwise, contact KW to get the toekn throught the iframe xdAuth.getCrossToken(function (err, tk) { diff --git a/package.json b/package.json index f5ad820..b224e8a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kano-world-sdk", - "version": "3.0.15", + "version": "3.0.16", "description": "Kano World SDK", "main": "lib/index.js", "scripts": {