2 Commits

Author SHA1 Message Date
935bb64306 1.0.12 2020-10-20 23:52:32 +00:00
24e8a2d97a fix(core): update 2020-10-20 23:52:31 +00:00
3 changed files with 3 additions and 3 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@consentsoftware/webclient", "name": "@consentsoftware/webclient",
"version": "1.0.11", "version": "1.0.12",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@consentsoftware/webclient", "name": "@consentsoftware/webclient",
"version": "1.0.11", "version": "1.0.12",
"private": false, "private": false,
"description": "a webclient for using consent.software in your website. Works with vanilla js, angular, react, you name it.", "description": "a webclient for using consent.software in your website. Works with vanilla js, angular, react, you name it.",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",

View File

@ -63,7 +63,7 @@ export class CsWebclient {
if (consentTuple.level === 'functional' || acceptedCookieLevels.includes(consentTuple.level)) { if (consentTuple.level === 'functional' || acceptedCookieLevels.includes(consentTuple.level)) {
const scriptString = consentTuple.script as string; const scriptString = consentTuple.script as string;
// tslint:disable-next-line: function-constructor // tslint:disable-next-line: function-constructor
const tupleFunction = new Function(`return ${scriptString}`); const tupleFunction = new Function(`return (${scriptString})()`);
await tupleFunction(consentTuple.scriptExecutionDataArg); await tupleFunction(consentTuple.scriptExecutionDataArg);
console.log (`Successfully executed ConsentTuple >>${consentTuple.name}<< -> ${consentTuple.description}`); console.log (`Successfully executed ConsentTuple >>${consentTuple.name}<< -> ${consentTuple.description}`);
} }