@didomi/react
Advanced tools
Comparing version 1.5.1 to 1.6.0
@@ -130,2 +130,15 @@ var _class, _temp; | ||
/** | ||
* Get the API Key from the props or from the config if it exists | ||
*/ | ||
DidomiSDK.prototype.getApiKey = function getApiKey() { | ||
var apiKey = void 0; | ||
if (this.props.config.app && this.props.config.app.apiKey) { | ||
apiKey = this.props.config.app.apiKey; | ||
} | ||
return this.props.apiKey || apiKey; | ||
}; | ||
/** | ||
* Initialize the SDK, set the config object and insert the loader.js into the DOM | ||
@@ -137,3 +150,3 @@ */ | ||
var loaderParams = void 0; | ||
var apiKey = this.props.apiKey; | ||
var apiKey = this.getApiKey(); | ||
var gdprAppliesGlobally = this.props.gdprAppliesGlobally === false ? false : true; | ||
@@ -140,0 +153,0 @@ window.didomiConfig = this.props.config || {}; |
@@ -140,2 +140,15 @@ 'use strict'; | ||
/** | ||
* Get the API Key from the props or from the config if it exists | ||
*/ | ||
DidomiSDK.prototype.getApiKey = function getApiKey() { | ||
var apiKey = void 0; | ||
if (this.props.config.app && this.props.config.app.apiKey) { | ||
apiKey = this.props.config.app.apiKey; | ||
} | ||
return this.props.apiKey || apiKey; | ||
}; | ||
/** | ||
* Initialize the SDK, set the config object and insert the loader.js into the DOM | ||
@@ -147,3 +160,3 @@ */ | ||
var loaderParams = void 0; | ||
var apiKey = this.props.apiKey; | ||
var apiKey = this.getApiKey(); | ||
var gdprAppliesGlobally = this.props.gdprAppliesGlobally === false ? false : true; | ||
@@ -150,0 +163,0 @@ window.didomiConfig = this.props.config || {}; |
{ | ||
"name": "@didomi/react", | ||
"version": "1.5.1", | ||
"version": "1.6.0", | ||
"description": "didomi-react-test React component", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
47328
689